コード例 #1
0
        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"]);
        }
コード例 #2
0
        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"]);
        }
コード例 #3
0
        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"]);
        }