private void SelectedState()
 {
     ChangeColorTo(Color.yellow);
     currentState = LightStatesEnum.Selected;
     EventManager.Instance.ButtonClickedEvent(gameObject.transform);
     StartCoroutine(KillLight());
 }
 private void Start()
 {
     EventManager.DisableInteractability += DisableInteractive;
     EventManager.EnableInteractability  += MakeInteractive;
     light        = GetComponent <Button>();
     currentState = LightStatesEnum.Alive;
     light.onClick.AddListener(SelectedState);
 }
    private IEnumerator KillLight()
    {
        currentState = LightStatesEnum.Dead;
        yield return(new WaitForEndOfFrame());

        CallDisableEvent();
        yield return(new WaitForSeconds(1));

        ChangeColorTo(Color.red);
        EventManager.DisableInteractability -= DisableInteractive;
        EventManager.EnableInteractability  -= MakeInteractive;
        yield return(new WaitForEndOfFrame());

        CallEnableEvent();
    }