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