Exemple #1
0
        public static ThirdPersonAction GetAction(ActionInConfig action)
        {
            ThirdPersonAction ret;

            switch (action)
            {
            case ActionInConfig.SwitchWeapon:
                ret = ThirdPersonAction.SwitchWeapon;
                break;

            case ActionInConfig.PickUp:
                ret = ThirdPersonAction.PickUp;
                break;

            case ActionInConfig.Reload:
                ret = ThirdPersonAction.Reload;
                break;

            case ActionInConfig.SpecialReload:
                ret = ThirdPersonAction.SpecialReload;
                break;

            default:
                ret = ThirdPersonAction.EndOfTheWorld;
                break;
            }

            return(ret);
        }
Exemple #2
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)));
 }
Exemple #3
0
        internal static ActionInConfig GetActionStateId(ActionStateId stateId)
        {
            ActionInConfig ret = ActionInConfig.Null;

            if (_actionIdMap.ContainsKey(stateId))
            {
                ret = _actionIdMap[stateId];
            }

            return(ret);
        }
Exemple #4
0
 private static bool IsStateInActionFilter(ActionInConfig state)
 {
     for (var i = 0; i < _actionStateFilters.Length; ++i)
     {
         if (_actionStateFilters[i] == state)
         {
             return(true);
         }
     }
     return(false);
 }
        private EPlayerState ActionToState(ActionInConfig action)
        {
            switch (action)
            {
            case ActionInConfig.Reload:
                return(EPlayerState.Reload);

            case ActionInConfig.SpecialFireHold:
            case ActionInConfig.Fire:
                return(EPlayerState.Firing);

            case ActionInConfig.SpecialReload:
                return(EPlayerState.SpecialReload);

            case ActionInConfig.SpecialFireEnd:
                return(EPlayerState.PullBolt);

            case ActionInConfig.Gliding:
                return(EPlayerState.Gliding);

            case ActionInConfig.Parachuting:
                return(EPlayerState.Parachuting);

            case ActionInConfig.PickUp:
                return(EPlayerState.Pickup);

            case ActionInConfig.SwitchWeapon:
                return(EPlayerState.SwitchWeapon);

            case ActionInConfig.MeleeAttack:
                return(EPlayerState.MeleeAttacking);

            case ActionInConfig.Grenade:
                return(EPlayerState.Grenade);

            case ActionInConfig.Props:
                return(EPlayerState.Props);

            case ActionInConfig.OpenDoor:
                return(EPlayerState.OpenDoor);

            default:
                return(EPlayerState.None);
            }
        }
Exemple #6
0
 public static bool FilterPlayerIK(ActionInConfig action, ActionKeepInConfig keepAction, PostureInConfig posture)
 {
     return(!(IsStateInActionFilter(action) ||
              IsStateInKeepActionFilter(keepAction) ||
              IsStateInPostureFilter(posture)));
 }