DamageData.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace KairoEngine.CharacterSystem
  5. {
  6. public struct DamageData
  7. {
  8. public DamageController damageController;
  9. public DamagePoint damagePoint;
  10. public int damage;
  11. public GameObject attackSourceObject;
  12. public CharacterController attackSourceCharacter;
  13. public Bullet bullet;
  14. public DamageEmitter damageEmitter;
  15. public Vector3 hitPosition;
  16. public Vector3 sourcePosition;
  17. public bool wasKilled;
  18. public DamageData(DamageController controller, DamagePoint point, int damage, GameObject attackSourceObj, CharacterController attackSourcecharacter,
  19. Bullet bullet, DamageEmitter damageEmitter, Vector3 hitPosition, Vector3 sourcePosition, bool wasKilled = false)
  20. {
  21. this.damageController = controller;
  22. this.damagePoint = point;
  23. this.damage = damage;
  24. this.attackSourceObject = attackSourceObj;
  25. this.attackSourceCharacter = attackSourcecharacter;
  26. this.bullet = bullet;
  27. this.damageEmitter = damageEmitter;
  28. this.hitPosition = hitPosition;
  29. this.sourcePosition = sourcePosition;
  30. this.wasKilled = wasKilled;
  31. }
  32. }
  33. }