private void start() { if (player != null) return; //in the future we may want to move this logic to a PlayerLoader gamemode or similar, so we can rely on the SongSelect transition //and provide a better loading experience (at the moment song select is still accepting input during preload). player = new Player { BeatmapInfo = carousel.SelectedGroup.SelectedPanel.Beatmap, PreferredPlayMode = playMode.Value }; player.Preload(Game, delegate { if (!Push(player)) { player = null; //error occured? } }); }
protected override void OnResuming(GameMode last) { player = null; changeBackground(Beatmap); ensurePlayingSelected(); base.OnResuming(last); Content.FadeIn(250); Content.ScaleTo(1, 250, EasingTypes.OutSine); }