Esempio n. 1
0
 public void DeactivateButton(PlaceableObjectButton button)
 {
     if (activeButton == button)
     {
         activeButton = null;
         FindObjectOfType <PlayerSpawner>().SetActivePlaceableObject(null);
         return;
     }
 }
Esempio n. 2
0
 public void SetActiveButton(PlaceableObjectButton button)
 {
     foreach (var butt in buttons)
     {
         butt.isActive = false;
     }
     if (activeButton == button)
     {
         activeButton = null;
         FindObjectOfType <PlayerSpawner>().SetActivePlaceableObject(null);
         return;
     }
     activeButton          = button;
     activeButton.isActive = true;
     activeButton.SetActivePrefab();
 }