private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         HM.SendMessage("DecHeart", null);
     }
 }
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player_foot")
     {
         HM.SendMessage("InHeart", null);
         gameObject.SetActive(false);
     }
 }
Beispiel #3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         HeartManager.SendMessage("DecHeart", null);
         Destroy(gameObject, 0);
     }
 }
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Player")
     {
         if (capcol.enabled == false)               //캐릭터가 범위에 들어왔을때
         {
             capcol.enabled = true;
             circol.enabled = false;
             fall();
         }
         else                 //캐릭터와 오브젝트 직접 충돌
         {
             capcol.enabled = false;
             HeartManager.SendMessage("DecHeart", null);
         }
     }
 }
Beispiel #5
0
 public void bump()
 {
     HeartManager.SendMessage("DecHeart", null);
     Destroy(gameObject);
 }