2016-11-17 16:20:51 +08:00
|
|
|
|
using osu.Framework.Extensions;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Framework.Graphics.Transformations;
|
2016-11-26 15:51:51 +08:00
|
|
|
|
using osu.Game.Modes.Objects.Drawables;
|
2016-11-17 16:20:51 +08:00
|
|
|
|
using OpenTK;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Modes.Osu.Objects.Drawables
|
|
|
|
|
{
|
|
|
|
|
public class HitExplosion : FlowContainer
|
|
|
|
|
{
|
|
|
|
|
private SpriteText line1;
|
|
|
|
|
private SpriteText line2;
|
|
|
|
|
|
2016-11-26 15:51:51 +08:00
|
|
|
|
public HitExplosion(OsuJudgementInfo judgement)
|
2016-11-17 16:20:51 +08:00
|
|
|
|
{
|
|
|
|
|
AutoSizeAxes = Axes.Both;
|
|
|
|
|
Anchor = Anchor.Centre;
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
|
|
|
|
|
Direction = FlowDirection.VerticalOnly;
|
|
|
|
|
Spacing = new Vector2(0, 2);
|
|
|
|
|
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
line1 = new SpriteText
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
2016-11-26 15:51:51 +08:00
|
|
|
|
Text = judgement.Score.GetDescription(),
|
2016-11-17 16:20:51 +08:00
|
|
|
|
Font = @"Venera",
|
|
|
|
|
TextSize = 20,
|
|
|
|
|
},
|
|
|
|
|
line2 = new SpriteText
|
|
|
|
|
{
|
2016-11-26 15:51:51 +08:00
|
|
|
|
Text = judgement.Combo.GetDescription(),
|
2016-11-17 16:20:51 +08:00
|
|
|
|
Font = @"Venera",
|
|
|
|
|
TextSize = 14,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
|
{
|
|
|
|
|
base.LoadComplete();
|
2016-12-05 17:34:40 +08:00
|
|
|
|
line1.TransformSpacingTo(new Vector2(14, 0), 1800, EasingTypes.OutQuint);
|
|
|
|
|
line2.TransformSpacingTo(new Vector2(14, 0), 1800, EasingTypes.OutQuint);
|
2016-11-17 16:20:51 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|