示例#1
0
 public void CleanState()
 {
     screen.Relaxed();
     commandtext.color  = new Color(commandtext.color.r, commandtext.color.g, commandtext.color.b, 0.0f);
     tutorialText.color = new Color(tutorialText.color.r, tutorialText.color.g, tutorialText.color.b, 0.0f);
     skipTutorialHintText.gameObject.SetActive(false);
 }
示例#2
0
    public void EndGame()
    {
        gameObject.SetActive(true);

        gameEnded = true;
        StopAllCoroutines();

        Cursor.lockState = CursorLockMode.None;
        Cursor.visible   = true;

        gm.UpdatePoints();
        controller.ExitDetailView();
        grabber.DropBox(0.0f, controller.transform.position);
        controller.enabled = false;
        grabber.enabled    = false;
        waveSystem.gameObject.SetActive(false);
        bossScreen.Relaxed();

        if (gm.playerWon)
        {
            StartCoroutine(CoroutineEndOk());
        }
        else
        {
            StartCoroutine(CoroutineEndFail());
        }
    }
示例#3
0
    public void SuccessfulDelivery(bool destroyedGarbage)
    {
        if (!playerCompletedFirstTask)
        {
            playerCompletedFirstTask           = true;
            playerCompletedFirstTaskSuccessful = true;
        }
        else
        {
            if (!playerCompletedSecondtask)
            {
                playerCompletedSecondtask           = true;
                playerCompletedSecondTaskSuccessful = true;
            }
            else if (!playerCompletedThirdTask)
            {
                playerCompletedThirdTask           = true;
                playerCompletedThirdTaskSuccessful = true;
            }
        }

        if (destroyedGarbage)
        {
            if (gameStarted)
            {
                _anger = Mathf.Clamp(_anger - angerReductionDestroyGarbage, 0.0f, 100.0f);
            }
            recollectedGarbage();
        }
        else
        {
            if (gameStarted)
            {
                _anger = Mathf.Clamp(_anger - angerReductionDeliverPackage, 0.0f, 100.0f);
            }
            incrementPoints();
        }

        bossScreen.Relaxed();

        boxesInScreen = Mathf.Max(0, boxesInScreen - 1);
    }