Esempio n. 1
0
    private void Start()
    {
        Application.targetFrameRate = 60;
        saveLoadManager             = GetComponentInChildren <SaveLoadManager>();
        savedData = saveLoadManager.LoadData();

        fruitSpawner = GetComponentInChildren <FruitSpawner>();
        if (saveLoadManager.GetTutorialStatus())
        {
            fruitSpawner.Init();
        }
        scoreManager = GetComponentInChildren <ScoreManager>();
        scoreManager.Init(savedData);
        guiManager = GetComponentInChildren <GuiManager>();
        guiManager.Init(saveLoadManager);
        powerupSpawner = GetComponentInChildren <PowerupSpawner>();
        powerupSpawner.Init(savedData);
        cameraController.Init((CameraStatus)saveLoadManager.GetCameraStatus(), saveLoadManager.GetScreenOrientationStatus());
        styleManager = GetComponentInChildren <StyleManager>();
        styleManager.Init(savedData);
        playStoreManager = GetComponentInChildren <PlayStoreManager>();
        playStoreManager.Init();
        achievementManager = GetComponentInChildren <AchievementManager>();
        adManager          = GetComponentInChildren <AdManager>();
        soundManager       = GetComponentInChildren <SoundManager>();
        soundManager.Init(saveLoadManager);
        soundManager.PlaySound(SoundEffectType.SOUND_SLITHER, false);
    }
Esempio n. 2
0
    private void Start()
    {
        saveLoadManager = GetComponentInChildren <SaveLoadManager>();
        savedData       = saveLoadManager.LoadData();

        fruitSpawner = GetComponentInChildren <FruitSpawner>();
        if (saveLoadManager.GetTutorialStatus())
        {
            fruitSpawner.Init();
        }
        scoreManager = GetComponentInChildren <ScoreManager>();
        scoreManager.Init(savedData);
        guiManager = GetComponentInChildren <GuiManager>();
        guiManager.Init(saveLoadManager);
        powerupSpawner = GetComponentInChildren <PowerupSpawner>();
        powerupSpawner.Init(savedData);
        cameraController.Init();
        styleManager = GetComponentInChildren <StyleManager>();
        styleManager.Init(savedData);
        soundManager = GetComponentInChildren <SoundManager>();
        soundManager.Init(saveLoadManager);
        soundManager.PlaySound(SoundEffectType.SOUND_SLITHER, false);
    }
Esempio n. 3
0
 /// <summary>
 /// Tutorial on first play has been completed so start spawning fruit.
 /// </summary>
 public void TutorialDone()
 {
     fruitSpawner.Init();
     fruitSpawner.SpawnNewFruit(false);
 }