コード例 #1
0
 public void OnHit(IGun gun)
 {
     _health -= gun.GetDamage();
     Debug.Log("Zombie health now " + _health);
     if (_health <= 0)
     {
         GameSingleton.Instance.zombieKills++;
         Destroy(gameObject);
         Debug.Log("Destroy zombie");
     }
 }
コード例 #2
0
 public bool IsSameTypeAs(IGun otherGun) => shotDMG == otherGun.GetDamage() &&
 shotSpeed == otherGun.GetShotSpeed() &&
 maxAmmo == otherGun.GetMaxAmmo();