1
0
forked from akanyan/mu3-mods

fix: various fixes

This commit is contained in:
2024-12-28 01:19:11 +00:00
parent 4f0cf6b327
commit afb872375d
6 changed files with 15 additions and 14 deletions

View File

@ -2,14 +2,19 @@
using MU3.Game;
using MU3.Sequence;
using MU3.Util;
using System.Collections;
using UnityEngine;
namespace MU3;
class patch_UIResultTechScore: UIResultTechScore {
private Animator animator_;
private MU3UICounter counterFast_;
private MU3UICounter counterLate_;
private static readonly int State_TechnicalScore_noLateFast_Loop = Animator.StringToHash("TechnicalScore_noLateFast_Loop");
private static readonly int State_TechnicalScore_Loop = Animator.StringToHash("TechnicalScore_Loop");
private void cloneCounter(MU3UICounter counter, Color color, int value) {
var otherValue = counter.CounterAsInt;
var offset = 12;
@ -27,7 +32,11 @@ class patch_UIResultTechScore: UIResultTechScore {
cpy.CounterAsInt = value;
}
private void drawCounters() {
private IEnumerator drawCounters() {
while(!AnimatorState.stateEquals(animator_, State_TechnicalScore_noLateFast_Loop) && !AnimatorState.stateEquals(animator_, State_TechnicalScore_Loop)) {
yield return null;
}
float posXf = counterFast_.gameObject.transform.localPosition.x + 5.0f;
float posXl = counterLate_.gameObject.transform.localPosition.x + 5.0f;
float posY = counterLate_.gameObject.transform.localPosition.y;
@ -53,6 +62,6 @@ class patch_UIResultTechScore: UIResultTechScore {
private extern void orig_drawTimingInclination(int numNotesFast, int numNotesLate);
private void drawTimingInclination(int numNotesFast, int numNotesLate) {
orig_drawTimingInclination(numNotesFast, numNotesLate);
drawCounters();
StartCoroutine(drawCounters());
}
}