Exemplo n.º 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);
        }
Exemplo n.º 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)));
 }
Exemplo n.º 3
0
        internal static ActionInConfig GetActionStateId(ActionStateId stateId)
        {
            ActionInConfig ret = ActionInConfig.Null;

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

            return(ret);
        }
Exemplo n.º 4
0
 private static bool IsStateInActionFilter(ActionInConfig state)
 {
     for (var i = 0; i < _actionStateFilters.Length; ++i)
     {
         if (_actionStateFilters[i] == state)
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 5
0
        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);
            }
        }
Exemplo n.º 6
0
 public static bool FilterPlayerIK(ActionInConfig action, ActionKeepInConfig keepAction, PostureInConfig posture)
 {
     return(!(IsStateInActionFilter(action) ||
              IsStateInKeepActionFilter(keepAction) ||
              IsStateInPostureFilter(posture)));
 }