Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Mar 28, 2024
1 parent b792aa4 commit 6c7f1df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ private static void After(
]);

// Cannot be startPosition directly
var positionX = Vector2.X.Get(position) + 8f;
// TODO: don't add 9f offset if [email protected]/score-p.png texture exists
var positionX = Vector2.X.Get(position) + 9f;
var positionY = GetYOffset(Vector2.Y.Get(position), scale, __instance);
var newPosition = ((ConstructorInfo)Vector2.Constructor.Reference).Invoke([positionX, positionY]);
pDrawable.Position.Set(performanceSprite, newPosition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ public static void UpdatePerformanceCounter(double pp)
{
try
{
var ruleset = Ruleset.Instance.Get();

var scoreDisplay = Ruleset.ScoreDisplay.Get(ruleset);
if (scoreDisplay == null) return;

if (!PerformanceCounter.TryGetTarget(out var sprite) || sprite == null)
return;

Expand Down

0 comments on commit 6c7f1df

Please sign in to comment.