2020-04-28 02:07:31 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2020-09-25 10:25:58 +00:00
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
2020-04-28 02:07:31 +00:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Tests
|
|
|
|
{
|
2020-09-25 10:25:58 +00:00
|
|
|
public class DrawableTestHit : DrawableHit
|
2020-04-28 02:07:31 +00:00
|
|
|
{
|
2020-09-25 10:25:58 +00:00
|
|
|
public readonly HitResult Type;
|
2020-04-28 02:07:31 +00:00
|
|
|
|
|
|
|
public DrawableTestHit(Hit hit, HitResult type = HitResult.Great)
|
|
|
|
: base(hit)
|
|
|
|
{
|
2020-09-25 10:25:58 +00:00
|
|
|
Type = type;
|
|
|
|
|
|
|
|
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
2020-04-28 02:07:31 +00:00
|
|
|
}
|
|
|
|
|
2020-09-26 15:26:26 +00:00
|
|
|
protected override void UpdateInitialTransforms()
|
|
|
|
{
|
|
|
|
// base implementation in DrawableHitObject forces alpha to 1.
|
|
|
|
// suppress locally to allow hiding the visuals wherever necessary.
|
|
|
|
}
|
|
|
|
|
2020-04-28 02:07:31 +00:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
2020-09-25 10:25:58 +00:00
|
|
|
Result.Type = Type;
|
2020-04-28 02:07:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public override bool OnPressed(TaikoAction action) => false;
|
|
|
|
}
|
|
|
|
}
|