Camera now always resets on game switch, even when scrubbing.

This commit is contained in:
Jenny Crowe 2022-02-23 20:17:53 -07:00
parent a64cb476e0
commit ac163fa2dc
1 changed files with 7 additions and 1 deletions

View File

@ -303,7 +303,6 @@ namespace RhythmHeavenMania
this.GetComponent<SpriteRenderer>().enabled = true; this.GetComponent<SpriteRenderer>().enabled = true;
SetGame(game); SetGame(game);
GameCamera.transform.localPosition = new Vector3(GameCamera.transform.localPosition.x, GameCamera.transform.localPosition.y, -10);
yield return new WaitForSeconds(0.1f); yield return new WaitForSeconds(0.1f);
@ -347,6 +346,8 @@ namespace RhythmHeavenMania
}*/ }*/
SetCurrentGame(game); SetCurrentGame(game);
ResetCamera();
} }
private void PreloadGame(string game) private void PreloadGame(string game)
@ -407,5 +408,10 @@ namespace RhythmHeavenMania
else else
return true; return true;
} }
public void ResetCamera()
{
GameCamera.transform.localPosition = new Vector3(0, 0, -10);
}
} }
} }