From 69583b1151a85f5b965b4f6ad1b513f2e7846b74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Sep 2021 17:44:14 +0000 Subject: [PATCH 1/4] Bump ppy.osu.Game from 2021.828.0 to 2021.916.0 Bumps [ppy.osu.Game](https://github.com/ppy/osu) from 2021.828.0 to 2021.916.0. - [Release notes](https://github.com/ppy/osu/releases) - [Commits](https://github.com/ppy/osu/compare/2021.828.0...2021.916.0) --- updated-dependencies: - dependency-name: ppy.osu.Game dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj b/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj index f97c9ad3..d51438b7 100644 --- a/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj +++ b/osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj @@ -14,7 +14,7 @@ - + From 9c4852426fc7b4eb8985a4612e4c72087201f6e7 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Thu, 16 Sep 2021 20:14:03 +0200 Subject: [PATCH 2/4] Use KeyBindingPress/ReleaseEvent --- .../Objects/Drawables/DrawableBeat.cs | 9 +++++---- .../Objects/Drawables/DrawableHardBeat.cs | 7 ++++--- .../Objects/Drawables/DrawableSlider.cs | 15 ++++++++------- osu.Game.Rulesets.Tau/UI/TauResumeOverlay.cs | 8 ++++---- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs index c588277d..84358aa3 100644 --- a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs +++ b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableBeat.cs @@ -5,6 +5,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Input.Bindings; +using osu.Framework.Input.Events; using osu.Game.Graphics; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; @@ -172,22 +173,22 @@ protected override void UpdateHitStateTransforms(ArmedState state) } } - public bool OnPressed(TauAction action) + public bool OnPressed(KeyBindingPressEvent e) { if (Judged) return false; - validActionPressed = HitActions.Contains(action); + validActionPressed = HitActions.Contains(e.Action); var result = UpdateResult(true); if (IsHit) - HitAction = action; + HitAction = e.Action; return result; } - public void OnReleased(TauAction action) + public void OnReleased(KeyBindingReleaseEvent e) { } } diff --git a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs index 047952d8..6786498a 100644 --- a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs +++ b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs @@ -3,6 +3,7 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Input.Bindings; +using osu.Framework.Input.Events; using osu.Game.Graphics; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; @@ -110,18 +111,18 @@ protected override void UpdateHitStateTransforms(ArmedState state) } } - public bool OnPressed(TauAction action) + public bool OnPressed(KeyBindingPressEvent e) { if (AllJudged) return false; - if (HitActions.Contains(action)) + if (HitActions.Contains(e.Action)) return UpdateResult(true); return false; } - public void OnReleased(TauAction action) + public void OnReleased(TauAction e) { } } diff --git a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs index 83113ff8..b023e4e2 100644 --- a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableSlider.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics.Lines; using osu.Framework.Graphics.Shapes; using osu.Framework.Input.Bindings; +using osu.Framework.Input.Events; using osu.Framework.Timing; using osu.Framework.Utils; using osu.Game.Audio; @@ -210,7 +211,7 @@ protected override void ClearNestedHitObjects() } double totalTimeHeld = 0; - + public readonly Bindable Tracking = new Bindable(); protected override void UpdateAfterChildren() @@ -295,11 +296,11 @@ protected override void UpdateAfterChildren() switch (effect.Value) { case KiaiType.Turbulent: - { - playfield.SliderParticleEmitter.AddParticle(angle, inversed); + { + playfield.SliderParticleEmitter.AddParticle(angle, inversed); - break; - } + break; + } case KiaiType.Classic: if ((int)Time.Current % 8 != 0) @@ -334,9 +335,9 @@ protected override void UpdateAfterChildren() playfield?.AdjustRingGlow(0, Vector2.Zero.GetDegreesFromPosition(path.Position)); } - public bool OnPressed(TauAction action) => HitActions.Contains(action) && !Tracking.Value; + public bool OnPressed(KeyBindingPressEvent e) => HitActions.Contains(e.Action) && !Tracking.Value; - public void OnReleased(TauAction action) + public void OnReleased(KeyBindingReleaseEvent e) { } diff --git a/osu.Game.Rulesets.Tau/UI/TauResumeOverlay.cs b/osu.Game.Rulesets.Tau/UI/TauResumeOverlay.cs index ff11694c..803b875b 100644 --- a/osu.Game.Rulesets.Tau/UI/TauResumeOverlay.cs +++ b/osu.Game.Rulesets.Tau/UI/TauResumeOverlay.cs @@ -53,7 +53,7 @@ private void load() } } }); - + Add(absoluteCursor = new TauCursor.AbsoluteCursor { Alpha = 0 @@ -126,9 +126,9 @@ protected override void OnHoverLost(HoverLostEvent e) base.OnHoverLost(e); } - public bool OnPressed(TauAction action) + public bool OnPressed(KeyBindingPressEvent e) { - switch (action) + switch (e.Action) { case TauAction.LeftButton: case TauAction.RightButton: @@ -143,7 +143,7 @@ public bool OnPressed(TauAction action) return false; } - public void OnReleased(TauAction action) + public void OnReleased(KeyBindingReleaseEvent e) { } } From 61c64d159547618601513e043186607fc6085dca Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Thu, 16 Sep 2021 20:37:15 +0200 Subject: [PATCH 3/4] Use AddGame in TestSceneOsuGame --- osu.Game.Rulesets.Tau.Tests/TestSceneOsuGame.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/osu.Game.Rulesets.Tau.Tests/TestSceneOsuGame.cs b/osu.Game.Rulesets.Tau.Tests/TestSceneOsuGame.cs index 6fa107ab..6ca2550c 100644 --- a/osu.Game.Rulesets.Tau.Tests/TestSceneOsuGame.cs +++ b/osu.Game.Rulesets.Tau.Tests/TestSceneOsuGame.cs @@ -1,6 +1,4 @@ using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Platform; using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Tau.Tests @@ -8,15 +6,9 @@ namespace osu.Game.Rulesets.Tau.Tests public class TestSceneOsuGame : OsuTestScene { [BackgroundDependencyLoader] - private void load(GameHost host, OsuGameBase gameBase) + private void load() { - OsuGame game = new OsuGame(); - game.SetHost(host); - - Children = new Drawable[] - { - game - }; + AddGame(new OsuGame()); } } } From 25988920b06ba6323469f0d404b2f7da11aba1b4 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Thu, 16 Sep 2021 20:42:04 +0200 Subject: [PATCH 4/4] Replace missed OnReleased method --- osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs index 6786498a..c504c37e 100644 --- a/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs +++ b/osu.Game.Rulesets.Tau/Objects/Drawables/DrawableHardBeat.cs @@ -122,7 +122,7 @@ public bool OnPressed(KeyBindingPressEvent e) return false; } - public void OnReleased(TauAction e) + public void OnReleased(KeyBindingReleaseEvent e) { } }