Example #1
0
 public static bool FilterPlayerIK(ActionInConfig action, ActionKeepInConfig keepAction, PostureInConfig posture,
                                   PostureInConfig nextPosture, MovementInConfig movement)
 {
     return(!(IsStateInActionFilter(action) ||
              IsStateInKeepActionFilter(keepAction) ||
              IsStateInPostureFilter(posture) ||
              IsStateInPostureFilter(nextPosture) ||
              IsStateInMovementFilter(movement)));
 }
Example #2
0
        internal static ActionKeepInConfig GetActionKeepStateId(ActionStateId curStateId, ActionStateId nextStateId)
        {
            ActionKeepInConfig ret = ActionKeepInConfig.Null;

            if (curStateId == ActionStateId.Sight || nextStateId == ActionStateId.Sight)
            {
                ret = ActionKeepInConfig.Sight;
            }
            return(ret);
        }
Example #3
0
 private static bool IsStateInKeepActionFilter(ActionKeepInConfig state)
 {
     for (var i = 0; i < _keepActionStateFilters.Length; ++i)
     {
         if (_keepActionStateFilters[i] == state)
         {
             return(true);
         }
     }
     return(false);
 }
Example #4
0
        protected override bool Filter(PlayerEntity playerEntity)
        {
            ActionKeepInConfig ac = playerEntity.stateInterface.State.GetActionKeepState();
            PostureInConfig    mc = playerEntity.stateInterface.State.GetCurrentPostureState();

            return(!(ac == ActionKeepInConfig.Drive ||
                     mc == PostureInConfig.Swim ||
                     mc == PostureInConfig.Dive ||
                     mc == PostureInConfig.DyingTransition ||
                     mc == PostureInConfig.Dying ||
                     mc == PostureInConfig.Climb));
        }
        private EPlayerState KeepActionToState(ActionKeepInConfig keepAction)
        {
            switch (keepAction)
            {
            case ActionKeepInConfig.Drive:
                return(EPlayerState.Drive);

            case ActionKeepInConfig.Sight:
                return(EPlayerState.Sight);

            default:
                return(EPlayerState.None);
            }
        }
Example #6
0
        internal static ActionKeepInConfig GetActionKeepStateId(ActionStateId stateId)
        {
            ActionKeepInConfig ret = ActionKeepInConfig.Null;

            switch (stateId)
            {
            case ActionStateId.Drive:
                ret = ActionKeepInConfig.Drive;
                break;

            case ActionStateId.Sight:
                ret = ActionKeepInConfig.Sight;
                break;

            case ActionStateId.Rescue:
                ret = ActionKeepInConfig.Rescue;
                break;

            default:
                ret = ActionKeepInConfig.Null;
                break;
            }
            return(ret);
        }
Example #7
0
 public static bool FilterPlayerIK(ActionInConfig action, ActionKeepInConfig keepAction, PostureInConfig posture)
 {
     return(!(IsStateInActionFilter(action) ||
              IsStateInKeepActionFilter(keepAction) ||
              IsStateInPostureFilter(posture)));
 }