コード例 #1
0
 public DamageInfo(float damage, DamageMatrix.Damage type, Vector3 point, Vector3 direction)
 {
     Damage    = damage;
     Type      = type;
     Point     = point;
     Direction = direction;
 }
コード例 #2
0
 public void DoDamage(IDamagable damagable, float damage, DamageMatrix.Damage type, Vector3 point, Vector3 direction)
 {
     if (damagable != null)
     {
         if (damagable.TakeDamage(new DamageInfo(damage, type, point, direction)) <= 0f)
         {
             OnKill?.Invoke(this, damagable);
         }
     }
 }