public void Stomp(GameObject obj) { if (isActive == true) { Player player = obj.GetComponent <Player>(); damageable.SetHealth(0); pusher.PushDealDamage(player.rb); sfxStomp.Play(); } }
/// <summary> /// Set health of damageable (which then sets value in inventory) /// </summary> /// <param name="health"></param> public void SetHealth(int health) { damageable.SetHealth(health); }