예제 #1
0
 public void ButtonPressed(Colors colorPressed, DelegateManager.EmptyVoid successCallback, DelegateManager.EmptyVoid failCallback)
 {
     if (correctColor == colorPressed)
     {
         successCallback();
     }
     else
     {
         failCallback();
     }
 }
예제 #2
0
    void Awake()
    {
        lockNum++;
        station = GetComponentInParent <RuneStation>();

        success += LockManager.CorrectButtonPressed;
        success += delegate { if (!station.correctButtonPressed)
                              {
                                  RuneManager.CorrectbuttonPressed();
                              }
        };
        success += () => station.correctButtonPressed = true;

        failure += () => Alien.AttractAliens(transform.position);
    }