private static StateInRuntime ConvertState(State originalState) { StateInRuntime State = new StateInRuntime(); State.SetState(originalState); State.SetWeaponStats(FileMgr.GetInstance().LoadWeaponStats(originalState.SelectedWeaponStats)); return(State); }
/// <summary> /// Resets the State, both in Run time and both in persistant storage. /// </summary> public StateInRuntime Reset() { FileMgr.GetInstance().DeleteState(); OriginatingState = null; State NewState = State.NewState(); FileMgr.GetInstance().SaveState(NewState); Instance = ConvertState(NewState); return(Instance); }
public void Start() { PlayerState = StateInRuntime.LoadState(); GameConstants.PREFAB_GAME_MANAGER.PlayerState = PlayerState; }
public static StateInRuntime LoadState() { FileMgr.GetInstance().LoadState(out State LoadedState); Instance = ConvertState(LoadedState); return(Instance); }