Beispiel #1
0
 protected void Awake()
 {
     if (GameInstance.CurrentInstance.NextSceneSaveData != null)
     {
         PersistenceFunctions.LoadData(GameInstance.CurrentInstance.NextSceneSaveData, _persistenceService.Get());
     }
 }
Beispiel #2
0
 protected void OnGameObjectCollides(GameObject inCollidingObject)
 {
     if (inCollidingObject.GetComponent <CharacterComponent>() != null && !_previouslySaved)
     {
         _previouslySaved = true;
         PersistenceFunctions.WriteCurrentSave(GameDataStorageConstants.SaveDataPath, _persistence.Get());
         UnityMessageEventFunctions.InvokeMessageEventWithDispatcher(inCollidingObject, new SaveGameTriggerActivatedMessage());
     }
 }