Exemple #1
0
 void OnTriggerEnter2D(Collider2D coll)
 {
     // If the player comes into contact with the orb...
     if (coll.gameObject.layer == LayerMask.NameToLayer("Player"))
     {
         gameBrain.PlayerPickedUpOrb();
         // After sending signal, disable the mesh renderer to make the sphere invisible and then disable this script
         meshRenderer.enabled = false;
         enabled = false;
     }
 }