diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index 3841420dad..d77e2d135b 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -42,7 +42,8 @@ namespace osu.Desktop.VisualTests.Tests objects.Add(new HitCircle() { StartTime = time, - Position = new Vector2(RNG.Next(0, 512), RNG.Next(0, 384)) + Position = new Vector2(RNG.Next(0, 512), RNG.Next(0, 384)), + Scale = RNG.NextSingle(0.5f, 1.0f), }); time += RNG.Next(50, 500); diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs index ebb5057a49..ccbfbb1db3 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs @@ -13,7 +13,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables { public class DrawableHitCircle : DrawableOsuHitObject { - private OsuHitObject osuObject; + private HitCircle osuObject; public ApproachCircle ApproachCircle; private CirclePiece circle; @@ -23,12 +23,13 @@ namespace osu.Game.Modes.Osu.Objects.Drawables private NumberPiece number; private GlowPiece glow; - public DrawableHitCircle(OsuHitObject h) : base(h) + public DrawableHitCircle(HitCircle h) : base(h) { osuObject = h; Origin = Anchor.Centre; Position = osuObject.Position; + Scale = new Vector2(osuObject.Scale); Children = new Drawable[] { @@ -104,7 +105,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables ApproachCircle.Alpha = 0; ApproachCircle.Scale = new Vector2(2); explode.Alpha = 0; - Scale = new Vector2(0.5f); //this will probably need to be moved to DrawableHitObject at some point. } protected override void UpdatePreemptState() diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs index e6e948cf6f..9e1fb93cd5 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableOsuHitObject.cs @@ -1,12 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Game.Modes.Objects; using osu.Game.Modes.Objects.Drawables; diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs index e0af180e95..fcf480c384 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs @@ -27,24 +27,32 @@ namespace osu.Game.Modes.Osu.Objects.Drawables slider = s; - Origin = Anchor.TopLeft; - Position = Vector2.Zero; - RelativeSizeAxes = Axes.Both; - Children = new Drawable[] { body = new SliderBody(s) { Position = s.Position, - PathWidth = 36, + PathWidth = s.Scale * 72, + }, + bouncer1 = new SliderBouncer(s, false) + { + Position = s.Curve.PositionAt(1), + Scale = new Vector2(s.Scale), + }, + bouncer2 = new SliderBouncer(s, true) + { + Position = s.Position, + Scale = new Vector2(s.Scale), + }, + ball = new SliderBall(s) + { + Scale = new Vector2(s.Scale), }, - bouncer1 = new SliderBouncer(slider, false) { Position = slider.Curve.PositionAt(1) }, - bouncer2 = new SliderBouncer(slider, true) { Position = slider.Position }, - ball = new SliderBall(slider), initialCircle = new DrawableHitCircle(new HitCircle { StartTime = s.StartTime, Position = s.Position, + Scale = s.Scale, Colour = s.Colour, }) { @@ -58,6 +66,10 @@ namespace osu.Game.Modes.Osu.Objects.Drawables components.Add(bouncer2); } + // Since the DrawableSlider itself is just a container without a size we need to + // pass all input through. + public override bool Contains(Vector2 screenSpacePos) => true; + protected override void Update() { base.Update(); diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBall.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBall.cs index ce34ef7c22..8d31acdf4e 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBall.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBall.cs @@ -16,7 +16,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces private readonly Slider slider; private Box follow; - const float width = 70; + const float width = 140; public SliderBall(Slider slider) { @@ -25,7 +25,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces AutoSizeAxes = Axes.Both; BlendingMode = BlendingMode.Additive; Origin = Anchor.Centre; - BorderThickness = 5; + BorderThickness = 10; BorderColour = Color4.Orange; Children = new Drawable[] @@ -45,7 +45,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces AutoSizeAxes = Axes.Both, Origin = Anchor.Centre, Anchor = Anchor.Centre, - BorderThickness = 7, + BorderThickness = 14, BorderColour = Color4.White, Alpha = 1, CornerRadius = width / 2, diff --git a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBouncer.cs b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBouncer.cs index 39d09e6d66..47a345bdc3 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBouncer.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/Pieces/SliderBouncer.cs @@ -35,7 +35,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces Icon = FontAwesome.fa_eercast, Anchor = Anchor.Centre, Origin = Anchor.Centre, - TextSize = 24, + TextSize = 48, } }; } diff --git a/osu.Game.Modes.Osu/Objects/OsuHitObject.cs b/osu.Game.Modes.Osu/Objects/OsuHitObject.cs index 61932f80a3..12fdf1a344 100644 --- a/osu.Game.Modes.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Modes.Osu/Objects/OsuHitObject.cs @@ -5,6 +5,7 @@ using System; using osu.Game.Beatmaps.Samples; using osu.Game.Modes.Objects; using OpenTK; +using osu.Game.Beatmaps; namespace osu.Game.Modes.Osu.Objects { @@ -12,8 +13,17 @@ namespace osu.Game.Modes.Osu.Objects { public Vector2 Position { get; set; } + public float Scale { get; set; } = 1; + public virtual Vector2 EndPosition => Position; + public override void SetDefaultsFromBeatmap(Beatmap beatmap) + { + base.SetDefaultsFromBeatmap(beatmap); + + Scale = (1.0f - 0.7f * (beatmap.BeatmapInfo.BaseDifficulty.CircleSize - 5) / 5) / 2; + } + [Flags] internal enum HitObjectType { diff --git a/osu.Game.Modes.Osu/Objects/Slider.cs b/osu.Game.Modes.Osu/Objects/Slider.cs index 3c11ead7e4..27210eec10 100644 --- a/osu.Game.Modes.Osu/Objects/Slider.cs +++ b/osu.Game.Modes.Osu/Objects/Slider.cs @@ -1,9 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Database; using osu.Game.Beatmaps; -using System; using OpenTK; namespace osu.Game.Modes.Osu.Objects @@ -18,6 +16,8 @@ namespace osu.Game.Modes.Osu.Objects public override void SetDefaultsFromBeatmap(Beatmap beatmap) { + base.SetDefaultsFromBeatmap(beatmap); + Velocity = 100 / beatmap.BeatLengthAt(StartTime, true) * beatmap.BeatmapInfo.BaseDifficulty.SliderMultiplier; }