Add rim hits.

This commit is contained in:
smoogipooo
2017-03-28 11:18:12 +09:00
parent 1faff828d1
commit b7d9de57a2
6 changed files with 138 additions and 53 deletions

View File

@ -1,6 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.MathUtils;
using osu.Framework.Screens.Testing;
using osu.Game.Modes.Objects.Drawables;
@ -23,19 +26,16 @@ namespace osu.Desktop.VisualTests.Tests
AddButton("Hit!", addHitJudgement);
AddButton("Miss :(", addMissJudgement);
AddButton("Centre", () =>
{
playfield.Add(new DrawableCentreHit(new Hit
{
StartTime = Time.Current + 1000,
PreEmpt = 1000,
IsStrong = false
}));
});
Add(playfield = new TaikoPlayfield
Add(new Container
{
Y = 200
RelativeSizeAxes = Axes.X,
Y = 200,
Padding = new MarginPadding { Left = 200 },
Children = new[]
{
playfield = new TaikoPlayfield()
}
});
}
@ -70,6 +70,34 @@ namespace osu.Desktop.VisualTests.Tests
});
}
private void addCentreHit(bool strong)
{
Hit h = new Hit
{
StartTime = Time.Current + 1000,
PreEmpt = 1000
};
if (strong)
playfield.Add(new DrawableStrongCentreHit(h));
else
playfield.Add(new DrawableCentreHit(h));
}
private void addRimHit(bool strong)
{
Hit h = new Hit
{
StartTime = Time.Current + 1000,
PreEmpt = 1000
};
if (strong)
playfield.Add(new DrawableStrongRimHit(h));
else
playfield.Add(new DrawableRimHit(h));
}
private class DrawableTestHit : DrawableHitObject<TaikoHitObject, TaikoJudgement>
{
public DrawableTestHit(TaikoHitObject hitObject)