Example #1
0
        public void CaseCompleted()
        {
            PMWrapper.StopCompiler();

            Main.instance.StartCoroutine(ShowFeedbackAndRunNextCase());
            LevelModeButtons.instance.SetCurrentCaseButtonState(LevelCaseState.Completed);
        }
Example #2
0
 public bool IsStepDone()
 {
     if (PMWrapper.IsCompilerRunning)
     {
         PMWrapper.StopCompiler();
     }
     return(!PMWrapper.IsCompilerRunning);
 }
Example #3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         // TODO play crash animation
         PMWrapper.RaiseTaskError("Podden kraschade. Undvik vägarbeten.");
         PMWrapper.StopCompiler();
     }
 }
        public void LoadLevel(int level)
        {
            PMWrapper.StopCompiler();

            // TODO Save mainCode to database
            UISingleton.instance.saveData.ClearPreAndMainCode();
            currentLevel.levelSetting.UseSettings();

            // Call every implemented event
            foreach (var ev in UISingleton.FindInterfaces <IPMLevelChanged>())
            {
                ev.OnPMLevelChanged();
            }
        }
        public void SetLevelCompleted()
        {
            PMWrapper.StopCompiler();

            foreach (var ev in UISingleton.FindInterfaces <IPMLevelCompleted>())
            {
                ev.OnPMLevelCompleted();
            }

            // If theres more levels && next level is locked
            if (PMWrapper.currentLevel < PMWrapper.numOfLevels - 1 && PMWrapper.currentLevel == PMWrapper.unlockedLevel)
            {
                // Unlock next level
                UISingleton.instance.levelbar.UpdateButtons(PMWrapper.currentLevel, PMWrapper.currentLevel + 1);
            }

            _ShowWinScreen();
        }
Example #6
0
 public void OnPMLevelChanged()
 {
     PMWrapper.StopCompiler();
     StopAllCoroutines();
 }
        public void CaseCompleted()
        {
            PMWrapper.StopCompiler();

            UISingleton.instance.levelHandler.StartCoroutine(ShowFeedbackAndRunNextCase());
        }
Example #8
0
        public void CaseCompleted()
        {
            PMWrapper.StopCompiler();

            Main.Instance.StartCoroutine(ShowFeedbackAndRunNextCase());
        }