public TestSceneGameplayCursor() { gameplayBeatmap = new GameplayBeatmap(CreateBeatmap(new OsuRuleset().RulesetInfo)); AddStep("change background colour", () => { background?.Expire(); Add(background = new Box { RelativeSizeAxes = Axes.Both, Depth = float.MaxValue, Colour = new Colour4(RNG.NextSingle(), RNG.NextSingle(), RNG.NextSingle(), 1) }); }); AddSliderStep("circle size", 0f, 10f, 0f, val => { config.SetValue(OsuSetting.AutoCursorSize, true); gameplayBeatmap.BeatmapInfo.BaseDifficulty.CircleSize = val; Scheduler.AddOnce(recreate); }); AddStep("test cursor container", recreate); void recreate() => SetContents(() => new OsuInputManager(new OsuRuleset().RulesetInfo) { Child = new OsuCursorContainer() }); }
private void load(GameplayBeatmap gameplayBeatmap) { if (gameplayBeatmap != null) { ((IBindable <JudgementResult>)LastResult).BindTo(gameplayBeatmap.LastJudgementResult); } }
private void load(TextureStore textures, GameplayBeatmap gameplayBeatmap) { InternalChildren = new[] { animations[TaikoMascotAnimationState.Idle] = new TaikoMascotAnimation(TaikoMascotAnimationState.Idle), animations[TaikoMascotAnimationState.Clear] = new TaikoMascotAnimation(TaikoMascotAnimationState.Clear), animations[TaikoMascotAnimationState.Kiai] = new TaikoMascotAnimation(TaikoMascotAnimationState.Kiai), animations[TaikoMascotAnimationState.Fail] = new TaikoMascotAnimation(TaikoMascotAnimationState.Fail), }; if (gameplayBeatmap != null) { ((IBindable <JudgementResult>)LastResult).BindTo(gameplayBeatmap.LastJudgementResult); } }
public void BeginPlaying(GameplayBeatmap beatmap) { if (isPlaying) { throw new InvalidOperationException($"Cannot invoke {nameof(BeginPlaying)} when already playing"); } isPlaying = true; // transfer state at point of beginning play currentState.BeatmapID = beatmap.BeatmapInfo.OnlineBeatmapID; currentState.RulesetID = currentRuleset.Value.ID; currentState.Mods = currentMods.Value.Select(m => new APIMod(m)); currentBeatmap = beatmap.PlayableBeatmap; beginPlaying(); }
public void BeginPlaying(GameplayBeatmap beatmap, Score score) { Debug.Assert(ThreadSafety.IsUpdateThread); if (IsPlaying) { throw new InvalidOperationException($"Cannot invoke {nameof(BeginPlaying)} when already playing"); } IsPlaying = true; // transfer state at point of beginning play currentState.BeatmapID = beatmap.BeatmapInfo.OnlineBeatmapID; currentState.RulesetID = currentRuleset.Value.ID; currentState.Mods = currentMods.Value.Select(m => new APIMod(m)); currentBeatmap = beatmap.PlayableBeatmap; currentScore = score; BeginPlayingInternal(currentState); }
public TestSceneGameplayCursor() { gameplayBeatmap = new GameplayBeatmap(CreateBeatmap(new OsuRuleset().RulesetInfo)); }