diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs index bf58c0c0e3..1764d3c487 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs @@ -21,11 +21,7 @@ public class DrawableOsuHitObject : DrawableHitObject protected DrawableOsuHitObject(OsuHitObject hitObject) : base(hitObject) { - shakeContainer = new ShakeContainer - { - RelativeSizeAxes = Axes.Both, - }; - base.AddInternal(shakeContainer); + base.AddInternal(shakeContainer = new ShakeContainer { RelativeSizeAxes = Axes.Both }); Alpha = 0; } @@ -72,10 +68,7 @@ public override void ApplyTransformsAt(double time, bool propagateChildren = fal private OsuInputManager osuActionInputManager; internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager); - protected virtual void Shake() - { - shakeContainer.Shake(); - } + protected virtual void Shake() => shakeContainer.Shake(); } public enum ComboResult diff --git a/osu.Game/Graphics/Containers/ShakeContainer.cs b/osu.Game/Graphics/Containers/ShakeContainer.cs index 3316fb5306..f90ae5c438 100644 --- a/osu.Game/Graphics/Containers/ShakeContainer.cs +++ b/osu.Game/Graphics/Containers/ShakeContainer.cs @@ -6,8 +6,14 @@ namespace osu.Game.Graphics.Containers { + /// + /// A container that adds the ability to shake its contents. + /// public class ShakeContainer : Container { + /// + /// Shake the contents of this container. + /// public void Shake() { const float shake_amount = 8;