Beispiel #1
0
        //---------------------------------------------------------------------------------------------------------
        // RetryLevel
        //---------------------------------------------------------------------------------------------------------
        // Transitions to the same level the player just completed so they can try again
        //---------------------------------------------------------------------------------------------------------
        void RetryLevel(object stuff = null)
        {
            var layer             = TutorialLayer.CreateScene(Window, activeLevel, activePlayer);
            var transitionToLayer = new CCTransitionSlideInR(0.2f, layer);

            Director.ReplaceScene(transitionToLayer);
        }
Beispiel #2
0
        //---------------------------------------------------------------------------------------------------------
        // Tutorial
        //---------------------------------------------------------------------------------------------------------
        // Transitions to the Tutorial
        //---------------------------------------------------------------------------------------------------------
        void Tutorial(object stuff = null)
        {
            currentPlayer.BranchProgression [0].BranchState = CompletionState.started;
            currentPlayer.WriteData(currentPlayer);
            var nextTutorialLevel = GetNextTutorialLevelToPlay();
            var layer             = TutorialLayer.CreateScene(Window, nextTutorialLevel, currentPlayer);
            var transitionToLayer = new CCTransitionSlideInR(0.2f, layer);

            Director.ReplaceScene(transitionToLayer);
        }
Beispiel #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);
            }
        }