Exemplo n.º 1
0
        private void CreateListeners()
        {
            //listen for replay button selected on game over panel
            Action <string> ListenForReplayButton = new Action <string>(ReplayGame);

            stateMachine.ListenForHUDEvent(UIEvents.Type.ReplayButtonSelected, ListenForReplayButton);

            //listen for quit button selected on quit panel
            Action <string> ListenForQuitButton = new Action <string>(QuitGame);

            stateMachine.ListenForHUDEvent(UIEvents.Type.QuitButtonSelected, ListenForQuitButton);

            //listen for submitting high score
            Action <string> ListenForHighScoreSubmit = new Action <string>(SubmitHighScore);

            stateMachine.ListenForHUDEvent(UIEvents.Type.SubmitHighScoreButtonSeleceted, ListenForHighScoreSubmit);
        }