diff --git a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs index 9f46bbd3a4..dbb0ca71cc 100644 --- a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs +++ b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs @@ -4,15 +4,19 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; using osu.Framework.MathUtils; using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces; using OpenTK; using OpenTK.Graphics; +using System; namespace osu.Game.Rulesets.Catch.Objects.Drawable { public class DrawableFruit : DrawableCatchHitObject { + private Circle border; + public DrawableFruit(Fruit h) : base(h) { @@ -69,7 +73,25 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable AccentColour = AccentColour, }, } - } + }, + border = new Circle + { + Size = new Vector2(Pulp.PULP_SIZE * 3.5f), + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + BorderColour = AccentColour, + BorderThickness = 3, + Children = new Framework.Graphics.Drawable[] + { + new Box + { + AlwaysPresent = true, + Colour = AccentColour, + Alpha = 0, + RelativeSizeAxes = Axes.Both + } + } + }, }; if (HitObject.HyperDash) @@ -86,5 +108,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable }); } } + + protected override void Update() + { + base.Update(); + border.Alpha = (float)MathHelper.Clamp((HitObject.StartTime - Time.Current) / 1000, 0, 1); + } } }