void StartBattle(BattleVariant battleVariant) { Stage = StageGame.Battle; hero.SetActive(true); ShowCanvasWays(false); mobSpawner.StartWaves(battleVariant); }
MusicClip FindMusic(StageGame stage) { List <MusicClip> clips = new List <MusicClip>(); clips.AddRange(MusicList.ToArray()); while (clips.Count > 0) { MusicClip clip = clips[UnityEngine.Random.Range(0, clips.Count)]; if (clip.stage == stage) { return(clip); } else { clips.Remove(clip); } } return(new MusicClip()); }