Exemplo n.º 1
0
 public void OnTriggerEnter(Collider thing)
 {
     //on désactive la piece
     coin.SetActive(false);
     //on maj le score
     score.AddCoin();
 }
Exemplo n.º 2
0
 void OnTriggerEnter2D(Collider2D boxCollider2D)
 {
     if (boxCollider2D.CompareTag("Player"))
     {
         Debug.Log("The player has picked a coin");
         score.AddCoin();
         pickupObject.SetActive(false);
     }
 }