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"); } }); }
public static void DispatchSwitchActivated(TileColor switchColor) { SwitchActivated?.Invoke(switchColor); }