diff --git a/osu.Game.Rulesets.Solosu.Tests/TestSceneOsuGame.cs b/osu.Game.Rulesets.Solosu.Tests/TestSceneOsuGame.cs index 18a4443..5223f8e 100644 --- a/osu.Game.Rulesets.Solosu.Tests/TestSceneOsuGame.cs +++ b/osu.Game.Rulesets.Solosu.Tests/TestSceneOsuGame.cs @@ -10,7 +10,6 @@ public class TestSceneOsuGame : OsuTestScene { [BackgroundDependencyLoader] private void load ( GameHost host, OsuGameBase gameBase ) { OsuGame game = new OsuGame(); - game.SetHost( host ); Children = new Drawable[] { @@ -18,9 +17,10 @@ private void load ( GameHost host, OsuGameBase gameBase ) { { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, - }, - game + } }; + + AddGame( game ); } } } diff --git a/osu.Game.Rulesets.Solosu/Mods/SolosuModAutoplay.cs b/osu.Game.Rulesets.Solosu/Mods/SolosuModAutoplay.cs index 7713253..ab34fe4 100644 --- a/osu.Game.Rulesets.Solosu/Mods/SolosuModAutoplay.cs +++ b/osu.Game.Rulesets.Solosu/Mods/SolosuModAutoplay.cs @@ -1,10 +1,8 @@ using osu.Game.Beatmaps; using osu.Game.Rulesets.Mods; -using osu.Game.Rulesets.Solosu.Objects; using osu.Game.Rulesets.Solosu.Replays; using osu.Game.Scoring; using osu.Game.Users; -using System; using System.Collections.Generic; namespace osu.Game.Rulesets.Solosu.Mods { diff --git a/osu.Game.Rulesets.Solosu/Objects/Drawables/DrawableHardBeat.cs b/osu.Game.Rulesets.Solosu/Objects/Drawables/DrawableHardBeat.cs index 6ada74a..49edf46 100644 --- a/osu.Game.Rulesets.Solosu/Objects/Drawables/DrawableHardBeat.cs +++ b/osu.Game.Rulesets.Solosu/Objects/Drawables/DrawableHardBeat.cs @@ -1,6 +1,5 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Shapes; -using osu.Framework.Input.Bindings; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; diff --git a/osu.Game.Rulesets.Solosu/SolosuRuleset.cs b/osu.Game.Rulesets.Solosu/SolosuRuleset.cs index 7b05e50..9cfb398 100644 --- a/osu.Game.Rulesets.Solosu/SolosuRuleset.cs +++ b/osu.Game.Rulesets.Solosu/SolosuRuleset.cs @@ -16,7 +16,6 @@ using osu.Game.Rulesets.UI; using osu.Game.Scoring; using osu.Game.Screens.Ranking.Statistics; -using osuTK; using System; using System.Collections.Generic; using System.Linq; diff --git a/osu.Game.Rulesets.Solosu/UI/DrawableSolosuRuleset.cs b/osu.Game.Rulesets.Solosu/UI/DrawableSolosuRuleset.cs index cf2e3ba..234938b 100644 --- a/osu.Game.Rulesets.Solosu/UI/DrawableSolosuRuleset.cs +++ b/osu.Game.Rulesets.Solosu/UI/DrawableSolosuRuleset.cs @@ -5,13 +5,11 @@ using osu.Game.Replays; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects.Drawables; -using osu.Game.Rulesets.Solosu.Mods; using osu.Game.Rulesets.Solosu.Objects; using osu.Game.Rulesets.Solosu.Replays; using osu.Game.Rulesets.UI; using osu.Game.Scoring; using System.Collections.Generic; -using System.Linq; namespace osu.Game.Rulesets.Solosu.UI { [Cached] diff --git a/osu.Game.Rulesets.Solosu/UI/PlayerByte.cs b/osu.Game.Rulesets.Solosu/UI/PlayerByte.cs index ba940e4..4eae9da 100644 --- a/osu.Game.Rulesets.Solosu/UI/PlayerByte.cs +++ b/osu.Game.Rulesets.Solosu/UI/PlayerByte.cs @@ -5,6 +5,7 @@ using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; using osu.Framework.Input.Bindings; +using osu.Framework.Input.Events; using osu.Framework.Utils; using osu.Game.Rulesets.Solosu.Collections; using osu.Game.Rulesets.Solosu.Objects; @@ -45,9 +46,9 @@ public PlayerByte () { List held = new(); List allHeld = new(); - public bool OnPressed ( SolosuAction action ) { - allHeld.Add( action ); - if ( action.IsMovement() ) { + public bool OnPressed ( KeyBindingPressEvent action ) { + allHeld.Add( action.Action ); + if ( action.Action.IsMovement() ) { if ( AutopilotBindable.Value ) return false; if ( allMoves.AnyAfter( Clock.CurrentTime ) ) { @@ -60,23 +61,23 @@ public bool OnPressed ( SolosuAction action ) { return false; } - moves.Add( action ); + moves.Add( action.Action ); allMoves.Add( Clock.CurrentTime, new InputState( moves ) ); updatePosition(); } - else if ( action.IsAction() ) { + else if ( action.Action.IsAction() ) { if ( RelaxBindable.Value ) return false; - held.Add( action ); + held.Add( action.Action ); @byte.ScaleTo( 0.8f, 20 ); } return false; } - public void OnReleased ( SolosuAction action ) { - allHeld.Remove( action ); - if ( action.IsMovement() ) { + public void OnReleased ( KeyBindingReleaseEvent action ) { + allHeld.Remove( action.Action ); + if ( action.Action.IsMovement() ) { if ( AutopilotBindable.Value ) return; if ( allMoves.AnyAfter( Clock.CurrentTime ) ) { @@ -89,14 +90,14 @@ public void OnReleased ( SolosuAction action ) { return; } - moves.Remove( action ); + moves.Remove( action.Action ); allMoves.Add( Clock.CurrentTime, new InputState( moves ) ); updatePosition(); } - else if ( action.IsAction() ) { + else if ( action.Action.IsAction() ) { if ( RelaxBindable.Value ) return; - held.Remove( action ); + held.Remove( action.Action ); if ( held.IsEmpty() ) @byte.ScaleTo( 1, 50 ); } } diff --git a/osu.Game.Rulesets.Solosu/osu.Game.Rulesets.Solosu.csproj b/osu.Game.Rulesets.Solosu/osu.Game.Rulesets.Solosu.csproj index 3ccbecf..70dc6f5 100644 --- a/osu.Game.Rulesets.Solosu/osu.Game.Rulesets.Solosu.csproj +++ b/osu.Game.Rulesets.Solosu/osu.Game.Rulesets.Solosu.csproj @@ -11,7 +11,7 @@ - +