private void OnRequestRespawnMessage(RequestRespawnMessage inMessage) { if (ActiveController.PawnInstance == inMessage.RequestingPlayer) { /* * ActiveController.PawnInitialTransform = * _spawnService.GetNearestSpawnLocation(inMessage.RequestingPlayer.transform.position); * * ActiveController.DestroyPawn(); * ActiveController.CreatePawnOfType(PlayerCharacterType); */ PersistenceFunctions.LoadCurrentSave(GameDataStorageConstants.SaveDataPath); } }
public void LoadCurrentSave_GameInstanceSetupAsExpected() { var gameInstanceObject = new GameObject(); gameInstanceObject.AddComponent <MockInputComponent>(); var instance = gameInstanceObject.AddComponent <TestGameInstance>(); instance.TestAwake(); const string testPath = "TestSaveFile.dat"; PersistenceFunctions.WriteCurrentSave(testPath, _service); PersistenceFunctions.LoadCurrentSave(testPath); Assert.IsNotNull(instance.NextSceneSaveData); Assert.AreEqual(SceneManager.GetActiveScene().path, instance.NextSceneToLoad); GameInstance.ClearGameInstance(); }
protected void OnButtonPressed() { PersistenceFunctions.LoadCurrentSave(GameDataStorageConstants.SaveDataPath); }