public void TestCatcherRandomStacking() { AddStep("catch more fruits", () => attemptCatch(() => new Fruit { X = (RNG.NextSingle() - 0.5f) * Catcher.CalculateCatchWidth(Vector2.One) }, 50)); }
public void TestCatcherCatchWidth() { var halfWidth = Catcher.CalculateCatchWidth(new BeatmapDifficulty { CircleSize = 0 }) / 2; AddStep("catch fruit", () => { attemptCatch(new Fruit { X = -halfWidth + 1 }); attemptCatch(new Fruit { X = halfWidth - 1 }); }); checkPlate(2); AddStep("miss fruit", () => { attemptCatch(new Fruit { X = -halfWidth - 1 }); attemptCatch(new Fruit { X = halfWidth + 1 }); }); checkPlate(2); }
public TestSceneCatcherArea() { AddSliderStep <float>("circle size", 0, 8, 5, createCatcher); AddToggleStep("hyper dash", t => this.ChildrenOfType <TestCatcherArea>().ForEach(area => area.ToggleHyperDash(t))); AddStep("catch centered fruit", () => attemptCatch(new Fruit())); AddStep("catch many random fruit", () => { int count = 50; addManyFruit?.Cancel(); addManyFruit = Scheduler.AddDelayed(() => { attemptCatch(new Fruit { X = (RNG.NextSingle() - 0.5f) * Catcher.CalculateCatchWidth(beatmapDifficulty) * 0.6f, }); if (count-- == 0) { addManyFruit?.Cancel(); } }, 50, true); }); AddStep("catch fruit last in combo", () => attemptCatch(new Fruit { LastInCombo = true })); AddStep("catch kiai fruit", () => attemptCatch(new TestSceneCatcher.TestKiaiFruit())); AddStep("miss last in combo", () => attemptCatch(new Fruit { X = 100, LastInCombo = true })); }
protected override Skill[] CreateSkills(IBeatmap beatmap) { halfCatcherWidth = Catcher.CalculateCatchWidth(beatmap.BeatmapInfo.BaseDifficulty) * 0.5f; return(new Skill[] { new Movement(halfCatcherWidth), }); }
protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) { halfCatcherWidth = Catcher.CalculateCatchWidth(beatmap.Difficulty) * 0.5f; // For circle sizes above 5.5, reduce the catcher width further to simulate imperfect gameplay. halfCatcherWidth *= 1 - (Math.Max(0, beatmap.Difficulty.CircleSize - 5.5f) * 0.0625f); return(new Skill[] { new Movement(mods, halfCatcherWidth, clockRate), }); }