Skip to content

Commit

Permalink
Merge pull request #183 from Beamographic/dependabot/nuget/ppy.osu.Ga…
Browse files Browse the repository at this point in the history
…me-2021.916.0

Bump ppy.osu.Game from 2021.820.0 to 2021.916.0
  • Loading branch information
LumpBloom7 authored Sep 16, 2021
2 parents 42d60c1 + 663a52a commit 57c90f8
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 34 deletions.
8 changes: 2 additions & 6 deletions osu.Game.Rulesets.Rush.Tests/Visual/TestSceneOsuGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Platform;
using osu.Game.Tests.Visual;
using osuTK.Graphics;

Expand All @@ -13,20 +12,17 @@ namespace osu.Game.Rulesets.Rush.Tests.Visual
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[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black,
},
game
};
AddGame(new OsuGame());
}
}
}
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Rush/Objects/Drawables/DrawableDualHit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Rush.Objects.Drawables.Pieces;
Expand Down Expand Up @@ -78,7 +79,7 @@ protected override void UpdateInitialTransforms()
}

// Input are handled by the DualHit parts, since they still act like normal minions
public override bool OnPressed(RushAction action) => false;
public override bool OnPressed(KeyBindingPressEvent<RushAction> e) => false;

protected override void CheckForResult(bool userTriggered, double timeOffset)
{
Expand Down
7 changes: 4 additions & 3 deletions osu.Game.Rulesets.Rush/Objects/Drawables/DrawableLanedHit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI.Scrolling;
Expand Down Expand Up @@ -53,12 +54,12 @@ protected override void OnDirectionChanged(ValueChangedEvent<ScrollingDirection>
Anchor = LaneAnchor;
}

public override bool OnPressed(RushAction action)
public override bool OnPressed(KeyBindingPressEvent<RushAction> e)
{
if (!action.IsLaneAction())
if (!e.Action.IsLaneAction())
return false;

if (!LaneMatchesAction(action) || AllJudged)
if (!LaneMatchesAction(e.Action) || AllJudged)
return false;

if (!CheckHittable(this))
Expand Down
7 changes: 2 additions & 5 deletions osu.Game.Rulesets.Rush/Objects/Drawables/DrawableMiniBoss.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Rush.Objects.Drawables.Pieces;
Expand Down Expand Up @@ -90,11 +91,7 @@ protected override void UpdateInitialTransforms()
mainPiece.Scale = new Vector2(base_sprite_scale);
}

public override bool OnPressed(RushAction action) => action.IsLaneAction() && UpdateResult(true);

public override void OnReleased(RushAction action)
{
}
public override bool OnPressed(KeyBindingPressEvent<RushAction> e) => e.Action.IsLaneAction() && UpdateResult(true);

protected override void CheckForResult(bool userTriggered, double timeOffset)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Scoring;

namespace osu.Game.Rulesets.Rush.Objects.Drawables
Expand Down Expand Up @@ -32,6 +33,6 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
{
}

public override bool OnPressed(RushAction action) => false;
public override bool OnPressed(KeyBindingPressEvent<RushAction> e) => false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
Expand Down Expand Up @@ -76,9 +77,9 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
ApplyResult(r => r.Type = r.Judgement.MaxResult);
}

public virtual bool OnPressed(RushAction action) => false;
public virtual bool OnPressed(KeyBindingPressEvent<RushAction> e) => false;

public virtual void OnReleased(RushAction action)
public virtual void OnReleased(KeyBindingReleaseEvent<RushAction> e)
{
}

Expand Down
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Rush/Objects/Drawables/DrawableSawblade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Rush.Objects.Drawables.Pieces;
using osu.Game.Rulesets.Rush.UI;
using osu.Game.Rulesets.Scoring;
Expand Down Expand Up @@ -64,7 +65,7 @@ protected override void OnApply()
}

// Sawblade doesn't handle user presses at all.
public override bool OnPressed(RushAction action) => false;
public override bool OnPressed(KeyBindingPressEvent<RushAction> e) => false;

protected override void CheckForResult(bool userTriggered, double timeOffset)
{
Expand Down
11 changes: 6 additions & 5 deletions osu.Game.Rulesets.Rush/Objects/Drawables/DrawableStarSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Rush.Objects.Drawables.Pieces;
Expand Down Expand Up @@ -170,12 +171,12 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
ApplyResult(r => r.Type = r.Judgement.MaxResult);
}

public override bool OnPressed(RushAction action)
public override bool OnPressed(KeyBindingPressEvent<RushAction> e)
{
if (!action.IsLaneAction())
if (!e.Action.IsLaneAction())
return false;

if (!LaneMatchesAction(action) || Head.Judged)
if (!LaneMatchesAction(e.Action) || Head.Judged)
return false;

if (!CheckHittable(this))
Expand All @@ -185,13 +186,13 @@ public override bool OnPressed(RushAction action)
return Head.Judged;
}

public override void OnReleased(RushAction action)
public override void OnReleased(KeyBindingReleaseEvent<RushAction> e)
{
// Note sheet not held yet (i.e. not our time yet) or already broken / finished.
if (Judged || !Head.IsHit)
return;

if (!LaneMatchesAction(action))
if (!LaneMatchesAction(e.Action))
return;

// Check if there was also another action holding the same star sheet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Rush.Objects.Drawables.Pieces;
using osu.Game.Rulesets.UI.Scrolling;
Expand Down Expand Up @@ -68,10 +69,6 @@ protected override void UpdateHitStateTransforms(ArmedState state)

protected override void OnDirectionChanged(ValueChangedEvent<ScrollingDirection> e) => Anchor = CapAnchor;

public override bool OnPressed(RushAction action) => false; // Handled by the star sheet object itself.

public override void OnReleased(RushAction action)
{
}
public override bool OnPressed(KeyBindingPressEvent<RushAction> e) => false; // Handled by the star sheet object itself.
}
}
9 changes: 5 additions & 4 deletions osu.Game.Rulesets.Rush/UI/RushPlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Pooling;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
Expand Down Expand Up @@ -218,15 +219,15 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)
}
}

public bool OnPressed(RushAction action)
public bool OnPressed(KeyBindingPressEvent<RushAction> e)
{
if (action == RushAction.Fever)
if (e.Action == RushAction.Fever)
return feverProcessor.TryActivateFever();

return PlayerSprite.HandleAction(action);
return PlayerSprite.HandleAction(e.Action);
}

public void OnReleased(RushAction action)
public void OnReleased(KeyBindingReleaseEvent<RushAction> e)
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Rush/osu.Game.Rulesets.Rush.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2021.820.0" />
<PackageReference Include="ppy.osu.Game" Version="2021.916.0" />
</ItemGroup>
</Project>

0 comments on commit 57c90f8

Please sign in to comment.