public void RestoreState(IStateSnippet savedState) { var state = (InventoryHealthEffectsSnippet)savedState; PlayerRunSpeedBonus = state.PlayerRunSpeedBonus; PlayerWalkSpeedBonus = state.PlayerWalkSpeedBonus; PlayerCrouchSpeedBonus = state.PlayerCrouchSpeedBonus; IsFreezed = state.IsFreezed; _freezedByInventoryOverloadEvent.RestoreState(state.ChildStates["FreezedByInventoryOverloadEvent"]); }
public void RestoreState(IStateSnippet savedState) { var state = (UnderwaterHealthEffectsSnippet)savedState; BloodPressureBottomBonus = state.BloodPressureBottomBonus; BloodPressureTopBonus = state.BloodPressureTopBonus; HeartRateBonus = state.HeartRateBonus; OxygenLevelBonus = state.OxygenLevelBonus; _lastUnderWaterState = state.LastUnderWaterState; _gameTimeGotUnderwater = state.GameTimeGotUnderwater; _drowningDeathEvent.RestoreState(state.ChildStates["DrowningDeathEvent"]); }
public void RestoreState(IStateSnippet savedState) { var state = (RunningHealthEffectsSnippet)savedState; BloodPressureBottomBonus = state.BloodPressureBottomBonus; BloodPressureTopBonus = state.BloodPressureTopBonus; HeartRateBonus = state.HeartRateBonus; OxygenLevelBonus = state.OxygenLevelBonus; BodyTemperatureBonus = state.BodyTemperatureBonus; _gameSecondsInRunningState = state.GameSecondsInRunningState; _isWheezeEventTriggered = state.IsWheezeEventTriggered; _intenseRunningOnEvent.RestoreState(state.ChildStates["IntenseRunningOnEvent"]); _intenseRunningOffEvent.RestoreState(state.ChildStates["IntenseRunningOffEvent"]); }