1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 01:13:21 +08:00

Improve visuals of temporary sliderball.

This commit is contained in:
Dean Herbert 2016-12-07 16:37:03 +09:00
parent 41b9a55460
commit b5e3dcbd1c
2 changed files with 17 additions and 15 deletions

View File

@ -3,12 +3,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Pieces; using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
using OpenTK; using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Modes.Osu.Objects.Drawables
{ {

View File

@ -16,6 +16,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
private readonly Slider slider; private readonly Slider slider;
private Box follow; private Box follow;
const float width = 70;
public SliderBall(Slider slider) public SliderBall(Slider slider)
{ {
this.slider = slider; this.slider = slider;
@ -23,6 +25,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
BlendingMode = BlendingMode.Additive; BlendingMode = BlendingMode.Additive;
Origin = Anchor.Centre; Origin = Anchor.Centre;
BorderThickness = 5;
BorderColour = Color4.Orange;
Children = new Drawable[] Children = new Drawable[]
{ {
@ -31,8 +35,9 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Colour = Color4.Orange, Colour = Color4.Orange,
Width = 80, Width = width,
Height = 80, Height = width,
Alpha = 0,
}, },
new Container new Container
{ {
@ -40,22 +45,22 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
AutoSizeAxes = Axes.Both, AutoSizeAxes = Axes.Both,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Colour = Color4.Cyan, BorderThickness = 7,
CornerRadius = 32, BorderColour = Color4.White,
Alpha = 1,
CornerRadius = width / 2,
Children = new[] Children = new[]
{ {
new Box new Box
{ {
Colour = slider.Colour,
Width = 64, Alpha = 0.4f,
Height = 64, Width = width,
Height = width,
}, },
} }
} }
}; };
Scale = new Vector2(0.94f);
} }
private InputState lastState; private InputState lastState;
@ -88,8 +93,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
tracking = value; tracking = value;
follow.ScaleTo(tracking ? 2.4f : 1, 140, EasingTypes.Out); follow.ScaleTo(tracking ? 2.8f : 1, 300, EasingTypes.OutQuint);
follow.FadeTo(tracking ? 0.8f : 0, 140, EasingTypes.Out); follow.FadeTo(tracking ? 0.2f : 0, 300, EasingTypes.OutQuint);
} }
} }