// Use this for initialization void Start() { var mus = GameObject.FindGameObjectWithTag("MusicSys"); if (mus) { music_sys = mus.GetComponent <MusicSys>(); } level_stats = GameObject.FindGameObjectWithTag("LevelPlaylist").GetComponent <LevelPlaylist>(); gameoverPanel.gameObject.SetActive(false); score_list = new List <PlayerScoreData>(); State = GameState.Setup; var entDB = GameObject.FindGameObjectWithTag("EntityDatabase"); stats = entDB.GetComponent <GameplayDatabase>().Stats[0]; scores = new List <int>(); scores.Add(stats.Score_first); scores.Add(stats.Score_second); scores.Add(stats.Score_third); scores.Add(stats.Score_fourth); if (music_sys) { music_sys.StopCurrent(); } }
// Use this for initialization void Start() { var mus=GameObject.FindGameObjectWithTag("MusicSys"); if (mus) music_sys=mus.GetComponent<MusicSys>(); level_stats=GameObject.FindGameObjectWithTag("LevelPlaylist").GetComponent<LevelPlaylist>(); gameoverPanel.gameObject.SetActive(false); score_list=new List<PlayerScoreData>(); State=GameState.Setup; var entDB=GameObject.FindGameObjectWithTag("EntityDatabase"); stats=entDB.GetComponent<GameplayDatabase>().Stats[0]; scores=new List<int>(); scores.Add(stats.Score_first); scores.Add(stats.Score_second); scores.Add(stats.Score_third); scores.Add(stats.Score_fourth); if (music_sys) music_sys.StopCurrent(); }