Exemplo n.º 1
0
 private void Update()
 {
     triggerCollider.enabled = Enabled;
     if (occupyingPlayer != null)
     {
         if (occupyingPlayer.IsCollecting())
         {
             Enabled = false;
             if (tracker != null)
             {
                 tracker.Hide();
             }
             if (OnCollect != null)
             {
                 occupyingPlayer.Give(GivePrefab);
                 OnCollect();
             }
         }
         //Debug.Log("PLAYER CAN COLLECT!");
     }
 }