void Start() { //reset level //reset scores playerConfigurationManager = PlayerConfigurationManager.Instance; currentPlayTime = maxPlayTime; PlayerPrefs.SetInt("FirstRound", 1); //spawn manager spawnManager = GameObject.Find("CollectibleSpawnManager").GetComponent <CollectibleSpawnManager>(); //Canvas objects mainTimerObj = GameObject.Find("MainTimer"); mainTimerText = mainTimerObj.GetComponent <TextMeshProUGUI>(); mainTimerObj.SetActive(false); scoresObject = GameObject.Find("ScoresObject"); scoresObject.SetActive(false); //Victory screen victoryCanvas.SetActive(false); AudioManager = AudioManager.Instance; AudioManager.PlaySound("LevelTrack"); AudioManager.StopSound("MenuTrack"); }
private void Start() { collectibleSpawnManager = FindObjectOfType <CollectibleSpawnManager>(); powerUpInteractor = GetComponent <CollectiblePowerUpInteractor>(); animator = GetComponent <Animator>(); RandomizeTime(); }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } diamondPrefabs = new Dictionary <string, GameObject>(); diamondPrefabs[Diamond.SmallDiamond] = smallDiamondPrefab; diamondPrefabs[Diamond.MediumDiamond] = mediumDiamondPrefab; diamondPrefabs[Diamond.LargeDiamond] = largeDiamondPrefab; }
void OnEnable() { CollectibleSpawnManager.csm = this; }