2019-01-24 16:43:03 +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.
|
2018-08-03 15:35:29 +08:00
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2020-12-15 06:11:51 +08:00
|
|
|
using JetBrains.Annotations;
|
2019-09-02 12:30:08 +08:00
|
|
|
using osu.Framework.Graphics;
|
2021-09-16 17:26:12 +08:00
|
|
|
using osu.Framework.Input.Events;
|
2020-12-07 11:30:25 +08:00
|
|
|
using osu.Game.Rulesets.Taiko.Skinning.Default;
|
2020-04-15 15:54:50 +08:00
|
|
|
using osu.Game.Skinning;
|
2018-08-03 15:35:29 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public partial class DrawableSwellTick : DrawableTaikoHitObject<SwellTick>
|
2018-08-03 15:35:29 +08:00
|
|
|
{
|
2018-08-06 10:31:46 +08:00
|
|
|
public override bool DisplayResult => false;
|
2018-08-03 15:49:24 +08:00
|
|
|
|
2020-12-15 06:11:51 +08:00
|
|
|
public DrawableSwellTick()
|
|
|
|
: this(null)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public DrawableSwellTick([CanBeNull] SwellTick hitObject)
|
2018-08-03 15:35:29 +08:00
|
|
|
: base(hitObject)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-09-02 12:30:08 +08:00
|
|
|
protected override void UpdateInitialTransforms() => this.FadeOut();
|
|
|
|
|
2020-09-29 14:13:11 +08:00
|
|
|
public void TriggerResult(bool hit)
|
2019-09-02 12:25:39 +08:00
|
|
|
{
|
|
|
|
HitObject.StartTime = Time.Current;
|
2020-09-29 14:13:11 +08:00
|
|
|
ApplyResult(r => r.Type = hit ? r.Judgement.MaxResult : r.Judgement.MinResult);
|
2019-09-02 12:25:39 +08:00
|
|
|
}
|
2018-08-03 15:35:29 +08:00
|
|
|
|
2018-08-06 10:31:46 +08:00
|
|
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
2018-08-03 15:35:29 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-09-16 17:26:12 +08:00
|
|
|
public override bool OnPressed(KeyBindingPressEvent<TaikoAction> e) => false;
|
2020-04-11 12:14:34 +08:00
|
|
|
|
2022-11-09 15:04:56 +08:00
|
|
|
protected override SkinnableDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponentLookup(TaikoSkinComponents.DrumRollTick),
|
2020-04-15 15:54:50 +08:00
|
|
|
_ => new TickPiece());
|
2018-08-03 15:35:29 +08:00
|
|
|
}
|
|
|
|
}
|