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"); } }
public bool IsSameTypeAs(IGun otherGun) => shotDMG == otherGun.GetDamage() && shotSpeed == otherGun.GetShotSpeed() && maxAmmo == otherGun.GetMaxAmmo();