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); }
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); }