2019-01-24 08:43:03 +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.
|
2018-08-03 07:35:29 +00:00
|
|
|
|
2019-09-02 04:30:08 +00:00
|
|
|
using osu.Framework.Graphics;
|
2020-12-07 03:30:25 +00:00
|
|
|
using osu.Game.Rulesets.Taiko.Skinning.Default;
|
2020-04-15 07:54:50 +00:00
|
|
|
using osu.Game.Skinning;
|
2018-08-03 07:35:29 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|
|
|
{
|
2018-11-29 15:05:13 +00:00
|
|
|
public class DrawableSwellTick : DrawableTaikoHitObject<SwellTick>
|
2018-08-03 07:35:29 +00:00
|
|
|
{
|
2018-08-06 02:31:46 +00:00
|
|
|
public override bool DisplayResult => false;
|
2018-08-03 07:49:24 +00:00
|
|
|
|
2018-11-29 15:05:13 +00:00
|
|
|
public DrawableSwellTick(SwellTick hitObject)
|
2018-08-03 07:35:29 +00:00
|
|
|
: base(hitObject)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-09-02 04:30:08 +00:00
|
|
|
protected override void UpdateInitialTransforms() => this.FadeOut();
|
|
|
|
|
2020-09-29 06:13:11 +00:00
|
|
|
public void TriggerResult(bool hit)
|
2019-09-02 04:25:39 +00:00
|
|
|
{
|
|
|
|
HitObject.StartTime = Time.Current;
|
2020-09-29 06:13:11 +00:00
|
|
|
ApplyResult(r => r.Type = hit ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
2019-09-02 04:25:39 +00:00
|
|
|
}
|
2018-08-03 07:35:29 +00:00
|
|
|
|
2018-08-06 02:31:46 +00:00
|
|
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
2018-08-03 07:35:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override bool OnPressed(TaikoAction action) => false;
|
2020-04-11 04:14:34 +00:00
|
|
|
|
2020-04-15 07:54:50 +00:00
|
|
|
protected override SkinnableDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.DrumRollTick),
|
|
|
|
_ => new TickPiece());
|
2018-08-03 07:35:29 +00:00
|
|
|
}
|
|
|
|
}
|