Example #1
0
        public void Begin()
        {
            //remove game over panel
            stateMachine.TriggerHUDEvent(UIEvents.Type.ToggleGameOverPanel, HUD.VisibleToggle.Hide.ToString());

            //camera change
            stateMachine.TriggerGameplayEvent(GameplayEvent.Type.CameraChange, GameplayCamera.LocationKey.Main.ToString());

            //reset hud
            stateMachine.TriggerHUDEvent(UIEvents.Type.ResetProgressOrbs);
            stateMachine.TriggerHUDEvent(UIEvents.Type.UpdateDetectionSlider, 0.ToString());
            stateMachine.TriggerHUDEvent(UIEvents.Type.UpdateScoreText, 0.ToString());

            //RESET MAIN VARIABLES
            stateMachine.GenerateCombination();
            stateMachine.gameWon                 = false;
            stateMachine.achievedHighScore       = false;
            stateMachine.round                   = 0;
            stateMachine.detectionLevel          = 0;
            stateMachine.currentCombinationCount = 0;
            stateMachine.playerScore             = 0;

            //transition
            stateMachine.StartCoroutine(TransitionToDisplay());
        }
Example #2
0
        public void Begin()
        {
            //init generate combination
            stateMachine.GenerateCombination();
            //UI
            stateMachine.TriggerHUDEvent(UIEvents.Type.InitProgressWidget, stateMachine.GetGameBlueprint().combinationCount.ToString());

            //GO TO INTRO STATE
            stateMachine.ChangeState(GameplayStateMachine.GameplayState.Intro);
        }