コード例 #1
0
 void IPMCompilerStopped.OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     if (status == HelloCompiler.StopStatus.RuntimeError)
     {
         SetIsManusPlaying(false);
     }
 }
コード例 #2
0
 void IPMCompilerStopped.OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     if (!PMWrapper.IsDemoingLevel)
     {
         reActivateField();
     }
 }
コード例 #3
0
 void IPMCompilerStopped.OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     if (status != HelloCompiler.StopStatus.RuntimeError)
     {
         SetState(State.Hidden);
     }
 }
コード例 #4
0
        void IPMCompilerStopped.OnPMCompilerStopped(HelloCompiler.StopStatus status)
        {
            //Tooltip.text = "Kör koden!";
            //Tooltip.ApplyTooltipTextChange();

            ThisButton.image.sprite = PlayImage;
        }
コード例 #5
0
 public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     if (status == HelloCompiler.StopStatus.Finished)
     {
         CorrectCase();
     }
 }
コード例 #6
0
    public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
    {
        if (status == HelloCompiler.StopStatus.Finished)
        {
            int itemsToUnload = 0;

            foreach (Section section in caseData.cars[0].sections)
            {
                itemsToUnload += section.itemCount;
            }

            if (itemsUnloaded < itemsToUnload)
            {
                int    itemsNotUnloaded      = itemsToUnload - itemsUnloaded;
                string itemsSingularOrPlural = itemsNotUnloaded == 1 ? "1 vara" : itemsNotUnloaded + " varor";
                PMWrapper.RaiseTaskError("Alla varor blev inte avlastade. Nu är det " + itemsSingularOrPlural + " som inte lastas av.");
            }

            if (itemsToUnload == itemsUnloaded)
            {
                PMWrapper.SetCaseCompleted();
            }
        }
        itemsUnloaded = 0;
    }
コード例 #7
0
    public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
    {
        PlayerMovement playerMovement = null;

        if (playerObject != null)
        {
            playerMovement = playerObject.GetComponent <PlayerMovement>();
        }

        if (status == HelloCompiler.StopStatus.Finished)
        {
            if (playerMovement != null && playerMovement.AtChargeStation)
            {
                if (!playerMovement.isCharging)
                {
                    PMWrapper.RaiseTaskError("Podden laddades inte. Kom ihåg att ladda().");
                }
            }
            else
            {
                PMWrapper.RaiseTaskError("Podden kom inte hela vägen fram.");
            }
        }
        if (playerMovement != null && !playerMovement.isCharging)
        {
            playerMovement.Reset();
        }
    }
コード例 #8
0
 public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     if (status == HelloCompiler.StopStatus.Finished)
     {
         if (!PMWrapper.levelShouldBeAnswered)
         {
             WinIfCarsUnloaded();
         }
     }
 }
コード例 #9
0
 public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     if (!IsTesting)
     {
         return;
     }
     if (status == HelloCompiler.StopStatus.RuntimeError || status == HelloCompiler.StopStatus.TaskError)
     {
         testErrors.Add(new TestError(Main.Instance.LevelDefinition.id, status.ToString()));
         TestNextLevel();
     }
 }
コード例 #10
0
    public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
    {
        if (status == HelloCompiler.StopStatus.Finished)
        {
            if (CorrectSorting())
            {
                PMWrapper.SetCaseCompleted();
            }
        }

        SortedQueue.ResetQueues();
    }
コード例 #11
0
        public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
        {
            if (LevelAnswer != null)
            {
                LevelAnswer.compilerHasBeenStopped = true;
            }

            if (status == HelloCompiler.StopStatus.Finished)
            {
                if (PMWrapper.levelShouldBeAnswered && UISingleton.instance.taskDescription.isActiveAndEnabled)
                {
                    PMWrapper.RaiseTaskError("Fick inget svar");
                }
            }
        }
コード例 #12
0
    public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
    {
        if (status == HelloCompiler.StopStatus.Finished)
        {
            if (CarsSorted < carsToSort)
            {
                PMWrapper.RaiseTaskError("Alla varor sorterades inte.");
            }
            else if (CorrectSorting())
            {
                PMWrapper.SetCaseCompleted();
            }
        }

        SortedQueue.ResetQueues();
    }
コード例 #13
0
        public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
        {
            if (status == HelloCompiler.StopStatus.Finished)
            {
                if (LevelMode == LevelMode.Sandbox && Main.Instance.LevelData.cases != null && Main.Instance.LevelData.cases.Count > 0)
                {
                    CorrectProgramPanel.SetActive(true);
                }
                else if (LevelMode == LevelMode.Case)
                {
                    foreach (var ev in UISingleton.FindInterfaces <IPMTimeToCorrectCase>())
                    {
                        ev.OnPMTimeToCorrectCase();
                    }
                }
                else
                {
                    PMWrapper.SetLevelCompleted();
                }
            }

            if (status == HelloCompiler.StopStatus.RuntimeError)
            {
                if (LevelMode == LevelMode.Case)
                {
                    Main.Instance.CaseHandler.CaseFailed();
                }
            }

            if (status == HelloCompiler.StopStatus.UserForced)
            {
                if (LevelMode == LevelMode.Case)
                {
                    Main.Instance.CaseHandler.IsCasesRunning = false;
                }
            }
        }
コード例 #14
0
 void IPMCompilerStopped.OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     reActivateField();
 }
コード例 #15
0
 public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     LoadCase(PMWrapper.currentLevel, 0);
 }
コード例 #16
0
 public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     DeactivateLastInput();
     StopAllCoroutines();
 }
コード例 #17
0
 public void OnPMCompilerStopped(HelloCompiler.StopStatus status)
 {
     DisableScanner();
     StopAllCoroutines();
 }