예제 #1
0
 void OnTriggerEnter(Collider coll)
 {
     if (coll.gameObject.tag == "Coin")
     {
         //add coin to player
     }
     else if (coll.gameObject.tag == "Checkpoint")
     {
         currentSpawnPoint = coll.transform.position;
     }
     else if (coll.gameObject.tag == "Ground")
     {
         if (grappled)
         {
             grappled = false;
             hookObj.DestroyAll();
         }
     }
 }