Conductor: property that returns secPerBeat scaled to song pitch

NEEDS TESTING
This commit is contained in:
minenice55
2022-03-22 14:29:15 -04:00
parent 7444165b08
commit f6df1644bc
5 changed files with 11 additions and 8 deletions

View File

@ -14,7 +14,7 @@ namespace HeavenStudio.Games
const float stepDistance = 2.115f;
public static float[] moleSoundOffsets = new float[]{ 0.134f, 0.05f, 0.061f };
float scrollRate => stepDistance / (Conductor.instance.secPerBeat * 2f / Conductor.instance.musicSource.pitch);
float scrollRate => stepDistance / (Conductor.instance.pitchedSecPerBeat * 2f);
float grassWidth;
float dotsWidth = 19.2f;

View File

@ -231,7 +231,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp
var veggieScale = veggieTrans.localScale;
veggieTrans.localScale = new Vector3(veggieScale.x * 0.5f, veggieScale.y, veggieScale.z);
squashTween = veggieTrans.DOScaleX(veggieScale.x, cond.secPerBeat * 0.5f / cond.musicSource.pitch);
squashTween = veggieTrans.DOScaleX(veggieScale.x, cond.pitchedSecPerBeat * 0.5f);
ResetState();