예제 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         Damage();
     }
     void Damage()
     {
         healthController.playerHealth = healthController.playerHealth - SpikeDamage;
         healthController.UpdateHealth();
         this.gameObject.SetActive(false);
     }
 }
 void Move()
 {
     healthController.playerHealth = healthController.playerHealth - bombDamage;
     healthController.UpdateHealth();
     SoundManagerScript.PlaySound("hit");
 }
예제 #3
0
 void Damage()
 {
     healthController.playerHealth = healthController.playerHealth - vDamage;
     healthController.UpdateHealth();
     this.gameObject.SetActive(false);
 }
예제 #4
0
 public void Damage()
 {
     healthController.currentHealth = healthController.currentHealth - damage;
     healthController.UpdateHealth();
     this.gameObject.SetActive(false);
 }