예제 #1
0
 void StartBattle(BattleVariant battleVariant)
 {
     Stage = StageGame.Battle;
     hero.SetActive(true);
     ShowCanvasWays(false);
     mobSpawner.StartWaves(battleVariant);
 }
예제 #2
0
    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());
    }