浏览代码

Merge branch 'pr/396' into main

/main
uChema 3 年前
当前提交
7ba7a559
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10
      UOP1_Project/Assets/Scripts/SceneManagement/EditorColdStartup.cs

10
UOP1_Project/Assets/Scripts/SceneManagement/EditorColdStartup.cs


[SerializeField] private AssetReference _notifyColdStartupChannel = default;
[SerializeField] private VoidEventChannelSO _onSceneReadyChannel = default;
[SerializeField] private PathStorageSO _pathStorage = default;
[SerializeField] private SaveSystem _saveSystem = default;
private bool isColdStart = false;

//Reset the path taken, so the character will spawn in this location's default spawn point
_pathStorage.lastPathTaken = null;
}
CreateSaveFileIfNotPresent();
}
private void Start()

//Raise a fake scene ready event, so the player is spawned
_onSceneReadyChannel.RaiseEvent();
//When this happens, the player won't be able to move between scenes because the SceneLoader has no conception of which scene we are in
}
}
private void CreateSaveFileIfNotPresent()
{
if (_saveSystem != null && !_saveSystem.LoadSaveDataFromDisk())
{
_saveSystem.WriteEmptySaveFile();
}
}
#endif
正在加载...
取消
保存