fade to correct scene when current scene doesn't match save file on load
This commit is contained in:
@@ -17,14 +17,16 @@ public void SavePlayerData(ref PlayerSaveData data)
|
||||
|
||||
public void LoadPlayerData(PlayerSaveData data)
|
||||
{
|
||||
/*if (data.currentScene != null && data.currentScene != SceneManager.GetActiveScene().name)
|
||||
if (data.currentScene != null && data.currentScene != SceneManager.GetActiveScene().name)
|
||||
{
|
||||
SceneManager.LoadScene(data.currentScene);
|
||||
}*/
|
||||
|
||||
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
|
||||
GameManager.Instance.PlayerController.cameraController.SnapToRotation(data.camRotation);
|
||||
GameManager.Instance.PlayerController.transform.position = data.dougPosition;
|
||||
GameManager.Instance.GoToMapPoint(new MapPoint(data.currentScene, data.dougPosition), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
|
||||
GameManager.Instance.PlayerController.cameraController.SnapToRotation(data.camRotation);
|
||||
GameManager.Instance.PlayerController.transform.position = data.dougPosition;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user