コード例 #1
0
ファイル: RuneStation.cs プロジェクト: BrockyBoi/GameJam-2018
 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);
    }