private void Die(ShootingAgent shooter) { shooter.RegisterKill(); gameObject.SetActive(false); enemyManager.RegisterDeath(); }
private void ApplyDamage(int damage, ShootingAgent shooter) { currentHealth -= damage; if (currentHealth <= 0) { Die(shooter); } }
// Start is called before the first frame update void Start() { currentHealth = startHealth; StartPosition = transform.position; sa = GetComponent <ShootingAgent>(); }
private void Die(ShootingAgent shooter) { shooter.RegisterKill(); Debug.Log(message: "I Died!"); Respawn(); }
public void GetShot(int damage, ShootingAgent shooter) { ApplyDamage(damage, shooter); }
public void GetShot(int damage, ShootingAgent shooter) { // AddReward(-1f); ApplyDamage(damage, shooter); }