Exemplo n.º 1
0
        public void CaseCompleted()
        {
            PMWrapper.StopCompiler();

            Main.instance.StartCoroutine(ShowFeedbackAndRunNextCase());
            LevelModeButtons.instance.SetCurrentCaseButtonState(LevelCaseState.Completed);
        }
Exemplo n.º 2
0
 public bool IsStepDone()
 {
     if (PMWrapper.IsCompilerRunning)
     {
         PMWrapper.StopCompiler();
     }
     return(!PMWrapper.IsCompilerRunning);
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
 public void OnPMLevelChanged()
 {
     PMWrapper.StopCompiler();
     StopAllCoroutines();
 }
        public void CaseCompleted()
        {
            PMWrapper.StopCompiler();

            UISingleton.instance.levelHandler.StartCoroutine(ShowFeedbackAndRunNextCase());
        }
Exemplo n.º 8
0
        public void CaseCompleted()
        {
            PMWrapper.StopCompiler();

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