Glee Club fix (#860)

* gleeclub

* Add shorter instantiation and better C offset

---------

Co-authored-by: EpicGamer2469 <epicgamer5694@gmail.com>
This commit is contained in:
フマジメ
2024-04-12 10:40:19 +09:00
committed by minenice55
parent 6e7ebdbf96
commit 72df7f1fa6
2 changed files with 17 additions and 14 deletions

View File

@ -83,8 +83,11 @@ public class NotePropertyPrefab : NumberPropertyPrefab
slider.wholeNumbers = true;
offsetFromC = 0;
if(note.offsetToC)
offsetFromC = 3 - note.sampleNote;
if (note.offsetToC) {
int sameC = 3 - note.sampleNote;
int upperC = 15 - note.sampleNote;
offsetFromC = Mathf.Abs(sameC) < Mathf.Abs(upperC) ? sameC : upperC;
}
int lastValue = (int)slider.value;
slider.value = Convert.ToSingle(parameterManager.entity[propertyName]) - offsetFromC;