예제 #1
0
    void Awake()
    {
        Time.timeScale = 1f;
        Application.targetFrameRate = 60;

        //gameStatus = true;
        MakeInstance();

        savedCoins = false;

        _ingameUiManager = this.GetComponent<IngameUIManager>();
        _scoreManager = this.gameObject.GetComponent<ScoreManager>();
        _levelEnvironmentSpawner = GameObject.Find("LevelSpawner").GetComponent<LevelEnvironmentSpawner>();

        if (LevelTypeController.instance != null)
        {
            gameType = LevelTypeController.instance.GetGameType();
        }
        else // In the editor this runs if you are not playing from the menu scene
        {
            gameType = "Level0";
            //gameType = "Level0";      Endless
        }


        if (LevelTypeController.instance.GetLastGameSlider() == false)
        {
            StartCoroutine(FadeInMusic());
        }
    }
예제 #2
0
    private void Awake()
    {
        environmentSpawnerScript = this.gameObject.GetComponent<LevelEnvironmentSpawner>();
        slideSpawnScript = this.gameObject.GetComponent<SlideSpawner>();
        levelSegSelect = this.gameObject.GetComponent<LevelSegmentSelection>();
        tutorialScript = this.gameObject.GetComponent<Tutorial>();

        //LoadTextAssets for ObjectSegments
        LoadTextAssets();
        MakeInstance();
    }
예제 #3
0
    void Awake()
    {
        scoreManagerScript = this.gameObject.GetComponent<ScoreManager>();
        _levelEnvironmentSpawner = GameObject.Find("LevelSpawner").GetComponent<LevelEnvironmentSpawner>();

        _audioOnOffButton.onClick.AddListener( ChangeAudioSettings );

        InitializeUIElements();
        if (LevelTypeController.instance.GetLastGameSlider() == false)
        {
            _startScreen.SetActive(true);
        }
        else
        {
            StartGameCountDown();
        }
        //_canvasTransform = GameObject.Find("Canvas").transform;
    }