protected override void SerializeState(GameStateMap stateMap) { base.SerializeState(stateMap); var state = new GameState { Messages = messages.TakeLast(SaveCapacity).Select(m => m.GetState()).ToList() }; stateMap.SetState(state); }
private void SerializeState(GameStateMap stateMap) { var state = new GameState() { RemoveAllButtonsPending = removeAllButtonsPending, Buttons = choiceButtons.Select(b => b.ChoiceState).ToList() }; stateMap.SetState(state, name); }
private Task SerializeState(GameStateMap stateMap) { var state = new GameState() { RemoveAllButtonsPending = removeAllButtonsPending }; stateMap.SetState(state, name); return(Task.CompletedTask); }
protected virtual void SerializeState(GameStateMap stateMap) { if (SaveVisibilityState) { var state = new GameState { Visible = Visible }; stateMap.SetState(state, name); } }
protected override void SerializeState(GameStateMap stateMap) { base.SerializeState(stateMap); var state = new GameState { RemoveAllButtonsPending = removeAllButtonsPending, Buttons = choiceButtons.Select(b => b.ChoiceState).ToList() }; stateMap.SetState(state, name); }
protected override void SerializeState(GameStateMap stateMap) { base.SerializeState(stateMap); var state = new GameState() { CurrentDate = varMan.GetVariableValue(date) }; stateMap.SetState(state); }
protected override async Task SerializeState(GameStateMap stateMap) { await base.SerializeState(stateMap); var state = new GameState() { Messages = messageStack.Take(saveCapacity).Select(m => m.GetState()).Reverse().ToList() }; stateMap.SetState(state); }
protected virtual void SerializeState(GameStateMap stateMap) { var state = new GameState() { Visible = Visible, HideOnClick = hideOnClick, AllowedSamplers = allowedSamplers }; stateMap.SetState(state, name); }
protected virtual Task SerializeState(GameStateMap stateMap) { if (saveVisibilityState) { var state = new GameState() { IsVisible = IsVisible }; stateMap.SetState(state, name); } return(Task.CompletedTask); }
protected override void SerializeState(GameStateMap stateMap) { base.SerializeState(stateMap); var state = new GameState { VariableName = variableName, SummaryText = summaryText.text, InputFieldText = inputField.text, PlayOnSubmit = playOnSubmit }; stateMap.SetState(state); }
protected override void SerializeState(GameStateMap stateMap) { // Invoked when the game is saved. base.SerializeState(stateMap); // Serialize UI state. var state = new GameState { Position = content.transform.position, Slots = grid.InventorySlots.Select(s => s.GetSate()).ToArray() }; stateMap.SetState(state); }