2020-04-28 10:07:31 +08: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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2021-09-16 17:26:12 +08:00
|
|
|
using osu.Framework.Input.Events;
|
2020-09-25 18:25:58 +08:00
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Beatmaps.ControlPoints;
|
2020-04-28 10:07:31 +08: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
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public partial class DrawableTestHit : DrawableHit
|
2020-04-28 10:07:31 +08:00
|
|
|
{
|
2020-09-25 18:25:58 +08:00
|
|
|
public readonly HitResult Type;
|
2020-04-28 10:07:31 +08:00
|
|
|
|
2020-12-13 05:48:22 +08:00
|
|
|
public DrawableTestHit(Hit hit, HitResult type = HitResult.Great, bool kiai = false)
|
2020-04-28 10:07:31 +08:00
|
|
|
: base(hit)
|
|
|
|
{
|
2020-09-25 18:25:58 +08:00
|
|
|
Type = type;
|
|
|
|
|
2020-12-13 05:48:22 +08:00
|
|
|
var controlPoints = new ControlPointInfo();
|
|
|
|
controlPoints.Add(0, new EffectControlPoint { KiaiMode = kiai });
|
|
|
|
|
|
|
|
HitObject.ApplyDefaults(controlPoints, new BeatmapDifficulty());
|
2020-04-28 10:07:31 +08:00
|
|
|
}
|
|
|
|
|
2020-09-26 23:26:26 +08:00
|
|
|
protected override void UpdateInitialTransforms()
|
|
|
|
{
|
|
|
|
// base implementation in DrawableHitObject forces alpha to 1.
|
|
|
|
// suppress locally to allow hiding the visuals wherever necessary.
|
|
|
|
}
|
|
|
|
|
2020-11-10 21:02:33 +08:00
|
|
|
protected override void LoadComplete()
|
2020-04-28 10:07:31 +08:00
|
|
|
{
|
2020-11-10 21:02:33 +08:00
|
|
|
base.LoadComplete();
|
|
|
|
|
2020-09-25 18:25:58 +08:00
|
|
|
Result.Type = Type;
|
2020-04-28 10:07:31 +08:00
|
|
|
}
|
|
|
|
|
2021-09-16 17:26:12 +08:00
|
|
|
public override bool OnPressed(KeyBindingPressEvent<TaikoAction> e) => false;
|
2020-04-28 10:07:31 +08:00
|
|
|
}
|
|
|
|
}
|