Пример #1
0
    void Start()
    {
        mainCamera.backgroundColor = new Color(0.38f, 0.06f, 0.44f, 1);

        InGameButtonManagerScript = GetComponent <InGameButtonManager>();
        fadeOutPanel.SetActive(true);
        soundManagerScript = GetComponent <soundManager>();
        soundManagerScript.closeDieSound();

        death = false;
        // score = 0f;
        power = 1f;

        startPanel.SetActive(true);
        tapToResumePanel.SetActive(false);
        pauseButton.SetActive(false);
        scoreTextObj.SetActive(false);
        highscoreTextObj.SetActive(false);
        watchVideoPanel.SetActive(false);

        deathEffectParticle.SetActive(false);

        powerLoseLevel = 0;
        powerLoseTimer = 0f;

        endGameMenuPanel.SetActive(false);

        rewardScoreTemp = PlayerPrefs.GetFloat("rewardScoreTemp");

        /* if (rewardScoreTemp != 0)
         *   PlayerPrefs.SetInt("gameLoop", 1); */

        gameLoop = PlayerPrefs.GetInt("gameLoop");
        if (gameLoop == 1)
        {
            startGameButton();
        }

        AdManagerScript.interstitialIncrease();

        rewardScoreTemp = PlayerPrefs.GetFloat("rewardScoreTemp");
        if (PlayerPrefs.GetInt("extraLife") == 1)
        {
            generalMovementScript.speed = PlayerPrefs.GetFloat("rewardSpeedTemp");
            score = PlayerPrefs.GetFloat("rewardScoreTemp");

            PlayerPrefs.SetFloat("rewardSpeedTemp", 0);
            PlayerPrefs.SetFloat("rewardScoreTemp", 0);

            PlayerPrefs.SetInt("extraLife", 0);

            VideoReq = false;
            pauseGame();
        }
        else
        {
            VideoReq = true;
        }

        setTextMethod();

        videoChanceCountdown = 5f;
    }