예제 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision != null && hitActive == true)
     {
         if (collision.tag == "Player")
         {
             Player_Health.reduceHealth(swordDamage);
             Debug.Log("Player Health: " + Player_Health.health);
         }
     }
 }
예제 #2
0
 private void attackPlayer()
 {
     Player_Health.reduceHealth(bumpDamage);
     Debug.Log("Player Health: " + Player_Health.health);
 }