-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(stubs): restructure lazys & clean up stubs
- Loading branch information
1 parent
f51439d
commit 1c39e58
Showing
42 changed files
with
634 additions
and
567 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,15 +40,15 @@ private static void After( | |
var scoreFont = SkinOsu.FontScore.Get(currentSkin); | ||
var scoreFontOverlap = SkinOsu.FontScoreOverlap.Get(currentSkin); | ||
|
||
var performanceSprite = ((ConstructorInfo)pSpriteText.Constructor.Reference).Invoke( | ||
var performanceSprite = pSpriteText.Constructor.Invoke( | ||
[ | ||
/* text: */ "00.0pp", | ||
/* fontName: */ scoreFont, | ||
/* spacingOverlap: */ (float)scoreFontOverlap, | ||
/* fieldType: */ alignRight ? Fields.TopRight : Fields.TopLeft, | ||
/* origin: */ alignRight ? Origins.TopRight : Origins.TopLeft, | ||
/* clock: */ Clocks.Game, | ||
/* startPosition: */ ((ConstructorInfo)Vector2.Constructor.Reference).Invoke([0f, 0f]), | ||
/* startPosition: */ Vector2.Constructor.Invoke([0f, 0f]), | ||
/* drawDepth: */ 0.95f, | ||
/* alwaysDraw: */ true, | ||
/* color: */ Color.White, | ||
|
@@ -60,7 +60,7 @@ private static void After( | |
// TODO: don't add 9f offset if [email protected]/score-p.png texture exists | ||
var positionX = Vector2.X.Get(position) + 8f; | ||
var positionY = GetYOffset(Vector2.Y.Get(position), scale, __instance); | ||
var newPosition = ((ConstructorInfo)Vector2.Constructor.Reference).Invoke([positionX, positionY]); | ||
var newPosition = Vector2.Constructor.Invoke([positionX, positionY]); | ||
pDrawable.Position.Set(performanceSprite, newPosition); | ||
|
||
pDrawable.Scale.Set(performanceSprite, 0.50f); | ||
|
@@ -76,9 +76,9 @@ private static void After( | |
private static float GetYOffset(float baseYPosition, float scale, object scoreDisplay) | ||
{ | ||
// Read the heights of both pSpriteTexts: s_Score, s_Accuracy | ||
var sprites = ScoreDisplay.RuntimeType | ||
var sprites = ScoreDisplay.Class.Reference | ||
.GetDeclaredFields() | ||
.Where(f => f.FieldType == pSpriteText.RuntimeType) | ||
.Where(f => f.FieldType == pSpriteText.Class.Reference) | ||
.Select(f => f.GetValue(scoreDisplay)); | ||
var spriteSizes = sprites | ||
.Where(s => s != null) | ||
|
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
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
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
Oops, something went wrong.