Skip to content

Commit

Permalink
update osu version
Browse files Browse the repository at this point in the history
  • Loading branch information
Flutterish committed Sep 17, 2021
1 parent 23048b7 commit fc9667c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 22 deletions.
6 changes: 3 additions & 3 deletions osu.Game.Rulesets.Solosu.Tests/TestSceneOsuGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ public class TestSceneOsuGame : OsuTestScene {
[BackgroundDependencyLoader]
private void load ( GameHost host, OsuGameBase gameBase ) {
OsuGame game = new OsuGame();
game.SetHost( host );

Children = new Drawable[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black,
},
game
}
};

AddGame( game );
}
}
}
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Solosu/Mods/SolosuModAutoplay.cs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion osu.Game.Rulesets.Solosu/SolosuRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Solosu/UI/DrawableSolosuRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
25 changes: 13 additions & 12 deletions osu.Game.Rulesets.Solosu/UI/PlayerByte.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -45,9 +46,9 @@ public PlayerByte () {

List<SolosuAction> held = new();
List<SolosuAction> allHeld = new();
public bool OnPressed ( SolosuAction action ) {
allHeld.Add( action );
if ( action.IsMovement() ) {
public bool OnPressed ( KeyBindingPressEvent<SolosuAction> action ) {
allHeld.Add( action.Action );
if ( action.Action.IsMovement() ) {
if ( AutopilotBindable.Value ) return false;

if ( allMoves.AnyAfter( Clock.CurrentTime ) ) {
Expand All @@ -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<SolosuAction> action ) {
allHeld.Remove( action.Action );
if ( action.Action.IsMovement() ) {
if ( AutopilotBindable.Value ) return;

if ( allMoves.AnyAfter( Clock.CurrentTime ) ) {
Expand All @@ -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 );
}
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Solosu/osu.Game.Rulesets.Solosu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<EmbeddedResource Include="Resources\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2021.608.0" />
<PackageReference Include="ppy.osu.Game" Version="2021.916.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\Samples\Gameplay" />
Expand Down

0 comments on commit fc9667c

Please sign in to comment.