Beispiel #1
0
 public override void Touched()
 {
     Debug.Log("Touched up");
     if (!Activated)
     {
         Activated = true;
         StartCoroutine(Activate());
         SwitchActivated?.Invoke(this, null);
     }
 }
 public void ActivateSwitch()
 {
     switchables.ForEach((switchable) => {
         SwitchActivated sa = switchable.GetComponent <SwitchActivated>();
         if (sa)
         {
             sa.OnSwitch();
         }
         else
         {
             Debug.Log("Switch contains switchable with no switchactivated component");
         }
     });
 }
Beispiel #3
0
 public static void DispatchSwitchActivated(TileColor switchColor)
 {
     SwitchActivated?.Invoke(switchColor);
 }