-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the top notes properly gray. add top note flash on note hit
- Loading branch information
Showing
9 changed files
with
35 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Linq; | ||
using System.Text; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Sprites; | ||
using osu.Framework.Graphics.Textures; | ||
|
@@ -23,35 +25,40 @@ public PumpTrainerHitObject(Column column) | |
} | ||
|
||
// does this belong here? | ||
public Sprite GetAssociatedSprite(TextureStore textures) | ||
public Sprite GetAssociatedSprite(TextureStore textures, bool gray) | ||
{ | ||
string textureString; | ||
StringBuilder textureString = new(); | ||
|
||
switch (Column) | ||
{ | ||
case Column.P1DL: | ||
case Column.P1DR: | ||
case Column.P2DL: | ||
case Column.P2DR: | ||
textureString = "DL"; | ||
textureString.Append("DL"); | ||
break; | ||
case Column.P1UL: | ||
case Column.P1UR: | ||
case Column.P2UL: | ||
case Column.P2UR: | ||
textureString = "UL"; | ||
textureString.Append("UL"); | ||
break; | ||
default: | ||
textureString = "C"; | ||
textureString.Append("C"); | ||
break; | ||
} | ||
|
||
if (gray) | ||
{ | ||
textureString.Append("-gray"); | ||
} | ||
|
||
Sprite sprite = new() | ||
{ | ||
RelativeSizeAxes = Axes.Both, | ||
Origin = Anchor.TopCentre, | ||
Anchor = Anchor.TopCentre, | ||
Texture = textures.Get(textureString), | ||
Texture = textures.Get(textureString.ToString()), | ||
}; | ||
|
||
switch (Column) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Collections.Generic; | ||
using osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Containers; | ||
|
@@ -14,6 +15,8 @@ namespace osu.Game.Rulesets.PumpTrainer.UI | |
[Cached] | ||
public partial class PumpTrainerPlayfield : ScrollingPlayfield | ||
{ | ||
public IReadOnlyList<DrawableTopRowHitObject> TopRowHitObjects; | ||
|
||
[BackgroundDependencyLoader] | ||
private void load(TextureStore textures) | ||
{ | ||
|
@@ -30,7 +33,7 @@ private void load(TextureStore textures) | |
Anchor = Anchor.TopCentre, | ||
Origin = Anchor.TopCentre, | ||
AutoSizeAxes = Axes.Both, | ||
Children = | ||
Children = TopRowHitObjects = | ||
[ | ||
new DrawableTopRowHitObject(new(Column.P1DL)), | ||
new DrawableTopRowHitObject(new(Column.P1UL)), | ||
|