camera tweak

This commit is contained in:
Rapandrasmus 2023-08-09 01:22:58 +02:00
parent 5216e4c8a7
commit bfdd77beb5

View file

@ -189,15 +189,15 @@ namespace HeavenStudio.Games
public void ZoomOut(double beat, float length, int timeMode, int hours, int minutes)
{
length = Mathf.Max(4, length);
length = Mathf.Max(3, length);
zoomOutStartBeat = beat;
zoomOutLength = length;
backgroundHandler.SetFade(beat, 0.25f, true, (TimeMode)timeMode, hours, minutes);
BeatAction.New(instance.gameObject, new List<BeatAction.Action>()
{
new BeatAction.Action(beat + length - 2, delegate
new BeatAction.Action(beat + length - 1, delegate
{
backgroundHandler.SetFade(beat + length - 2, 0.25f, false, (TimeMode)timeMode, hours, minutes);
backgroundHandler.SetFade(beat + length - 1, 0.25f, false, (TimeMode)timeMode, hours, minutes);
})
});
CameraUpdate();
@ -620,7 +620,7 @@ namespace HeavenStudio.Games
float newZ = 0f;
float normalizedZoomFirst = cond.GetPositionFromBeat(zoomOutStartBeat, 2);
float normalizedZoomLast = cond.GetPositionFromBeat(zoomOutStartBeat + zoomOutLength - 2, 2);
float normalizedZoomLast = cond.GetPositionFromBeat(zoomOutStartBeat + zoomOutLength - 1, 1);
if (normalizedZoomFirst > 1)
{