private void SprintDisableTest(ICharacterState state, IAdaptiveContainer <IFsmInputCommand> commands)
        {
            bool slowDown = false;

            if (state.IsMoveInWater() || state.IsSteepSlope())
            {
                for (int i = 0; i < commands.Length; ++i)
                {
                    var v = commands[i];
                    if (v.Type == FsmInput.Sprint)
                    {
                        v.Type   = FsmInput.Run;
                        slowDown = true;
                    }
                }
            }
            state.SetBeenSlowDown(slowDown);
        }
Пример #2
0
        private void SprintDisableTest(ICharacterState state, IAdaptiveContainer <IFsmInputCommand> commands)
        {
            bool slowDown = false;

            if (state.IsMoveInWater() || state.IsSteepSlope())
            {
                for (int i = 0; i < commands.Length; ++i)
                {
                    var v = commands[i];
                    if (v.Type == FsmInput.Sprint)
                    {
                        v.Type = FsmInput.Run;
                        _logger.DebugFormat("sprint to run due to move in water or is steep slope!");
                        slowDown = true;
                    }
                }
            }

            state.SetBeenSlowDown(slowDown);
        }