コード例 #1
0
        //---------------------------------------------------------------------------------------------------------
        // QuitLevel
        //---------------------------------------------------------------------------------------------------------
        // If they've had enough for now, let them quit back to the Select Challenge layer
        //---------------------------------------------------------------------------------------------------------
        void QuitLevel(object stuff = null)
        {
            var mainMenu             = SelectChallengeLayer.CreateScene(Window, activePlayer);
            var transitionToMainMenu = new CCTransitionFade(2.0f, mainMenu);

            Director.ReplaceScene(transitionToMainMenu);
        }
コード例 #2
0
        //---------------------------------------------------------------------------------------------------------
        // Challenges
        //---------------------------------------------------------------------------------------------------------
        // Transitions to the Select Challenge layer
        //---------------------------------------------------------------------------------------------------------
        void Challenges(object stuff = null)
        {
            var layer             = SelectChallengeLayer.CreateScene(Window, currentPlayer);
            var transitionToLayer = new CCTransitionSlideInR(0.2f, layer);

            Director.ReplaceScene(transitionToLayer);
        }
コード例 #3
0
        //---------------------------------------------------------------------------------------------------------
        // NextLevel
        //---------------------------------------------------------------------------------------------------------
        // Transitions to the next level for play.  If the next level is not in the Tutorial branch, then
        // transition to the SelectChallengeLayer
        //---------------------------------------------------------------------------------------------------------
        void NextLevel(object stuff = null)
        {
            var nextTutorialLevel = GetNextTutorialLevelToPlay();

            if (nextTutorialLevel.BranchNum < 1)
            {
                var layer             = TutorialLayer.CreateScene(Window, nextTutorialLevel, activePlayer);
                var transitionToLayer = new CCTransitionSlideInR(0.2f, layer);
                Director.ReplaceScene(transitionToLayer);
            }
            else
            {
                activePlayer.BranchProgression [1].IsLocked    = false;
                activePlayer.BranchProgression [0].BranchState = CompletionState.completed;
                activePlayer.ConsumableAdd = activePlayer.ConsumableCheckPoint = activePlayer.ConsumableNextSeq = activePlayer.ConsumableSubtract = 0;
                activePlayer.WriteData(activePlayer);
                var layer             = SelectChallengeLayer.CreateScene(Window, activePlayer);
                var transitionToLayer = new CCTransitionSlideInR(0.2f, layer);
                Director.ReplaceScene(transitionToLayer);
            }
        }