コード例 #1
0
 public static void ChangeState(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int arg4)
 {
     State.ChangeState vars = (State.ChangeState)variables;
     fighter.StateManager.MarkForStateChange(vars.stateID, vars.stateMovesetID);
 }
コード例 #2
0
        public static void ApplyTraction(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int arg4)
        {
            State.VarApplyTraction vars = (State.VarApplyTraction)variables;
            FighterManager         fm   = (FighterManager)fighter;

            if (vars.useTractionStat)
            {
                fm.physicsManager.ApplyFriction(vars.aerialTraction ? fm.statManager.aerialTraction : fm.statManager.groundTraction);
            }
            else
            {
                fm.physicsManager.ApplyFriction(vars.traction);
            }
        }
コード例 #3
0
        public static void SetFallSpeed(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int arg4)
        {
            State.VarSetFallSpeed vars = (State.VarSetFallSpeed)variables;
            FighterManager        fm   = (FighterManager)fighter;

            fm.physicsManager.SetFallSpeed(vars.value);
        }
コード例 #4
0
        public static void ApplyGravity(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int arg4)
        {
            State.VarApplyGravity vars = (State.VarApplyGravity)variables;
            FighterManager        fm   = (FighterManager)fighter;

            fm.physicsManager.ApplyGravity(vars.useMaxFallSpeedStat ? fm.statManager.maxFallSpeed : vars.maxFallSpeed,
                                           vars.useGravityStat ? fm.statManager.gravity : vars.gravity);
        }
コード例 #5
0
 public static bool NoCondition(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4)
 {
     return(true);
 }
コード例 #6
0
        public static bool GroundedState(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4)
        {
            ConditionGroundState vars = (ConditionGroundState)variables;

            bool r = fighter.PhysicsManager.IsGrounded;

            if (vars.inverse)
            {
                r = !r;
            }
            return(r);
        }
コード例 #7
0
        public static bool FallSpeed(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4)
        {
            FighterPhysicsManager physicsManager = ((FighterManager)fighter).physicsManager;
            ConditionFallSpeed    vars           = (ConditionFallSpeed)variables;

            bool r = false;

            if (vars.inverse)
            {
                r = physicsManager.forceMovement.y <vars.minValue || physicsManager.forceMovement.y> vars.maxValue;
            }
            else
            {
                r = physicsManager.forceMovement.y >= vars.minValue && physicsManager.forceMovement.y <= vars.maxValue;
            }
            return(r);
        }
コード例 #8
0
        public static bool MovementSqrMagnitude(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4)
        {
            FighterInputManager        inputManager = ((FighterManager)fighter).InputManager;
            ConditionMovementMagnitude vars         = (ConditionMovementMagnitude)variables;

            Vector2 movement = inputManager.GetMovement(0);
            bool    r = vars.inverse ? movement.sqrMagnitude <vars.sqrMagnitude : movement.sqrMagnitude> vars.sqrMagnitude;

            return(r);
        }