Example #1
0
    public override void Update()
    {
        //				controller.Inputter.GetInput ();
        //				controller.Inputter.ProcessInput ();

        if (controller.IsGrounded(controller.groundedLookAhead) == false)
        {
            DoTransition(typeof(FitState_AM_Fall));
            return;
        }

        CheckIASA();

        if (controller.Inputter.y <= -0.60f && controller.Inputter.y >= -0.85f)
        {
            if (controller.OnPassThrough(controller.groundedLookAhead))
            {
                DoTransition(typeof(FitState_AM_Pass));
                return;
            }
        }

        if (!controller.Inputter.ShieldButtonHeld)
        {
            controller.EndAnim = false;
            DoTransition(typeof(FitState_AM_ShieldOff));
            return;
        }
    }
    public override void Update()
    {
        //				controller.Inputter.GetInput ();
        //				controller.Inputter.ProcessInput ();

        if (controller.IsGrounded(controller.groundedLookAhead) == false)
        {
            DoTransition(typeof(FitState_AM_Fall));
            return;
        }

        CheckIASA();

        if (controller.Inputter.y <= -0.65f)
        {
            if (controller.Inputter.FramesYNeutral <= 4 && controller.OnPassThrough(controller.groundedLookAhead))
            {
                DoTransition(typeof(FitState_AM_Pass));
                return;
            }
            else
            {
                DoTransition(typeof(FitState_AM_Crouch));
                return;
            }
        }

        if (controller.EndAnim)
        {
            controller.EndAnim = false;
            DoTransition(typeof(FitState_AM_Idle));
            return;
        }
    }
    public override void Update()
    {
//				controller.Inputter.GetInput ();
//				controller.Inputter.ProcessInput ();

        if (controller.IsGrounded(controller.groundedLookAhead) == false)
        {
            DoTransition(typeof(FitState_AM_Fall));
            return;
        }

        CheckIASAIdle();
//				if (controller.BfAction == BufferedAction.JAB) {
//								DoTransition (typeof(FitState_AM_GroundAttack));
//								return;
//						}
//
//						if (controller.BfAction == BufferedAction.JUMP) {
//
//								DoTransition (typeof(FitState_AM_JumpSquat));
//								return;
//						}
//
//
//				if (controller.BfAction == BufferedAction.WALKING) {
//						if (Mathf.Abs (controller.Inputter.x) >= 0.5f) {
//								DoTransition (typeof(FitState_AM_WalkFast));
//								return;
//						} else {
//								DoTransition (typeof(FitState_AM_WalkSlow));
//								return;
//						}
//				}
//
//				if (controller.BfAction == BufferedAction.INIT_DASH) {
//						DoTransition (typeof(FitState_AM_InitDash));
//						return;
//				}

        if (controller.Inputter.y <= -0.65f)
        {
            if (controller.Inputter.FramesYNeutral <= 4 && controller.OnPassThrough(controller.groundedLookAhead))
            {
                DoTransition(typeof(FitState_AM_Pass));
                return;
            }
            else
            {
                DoTransition(typeof(FitState_AM_Crouch));
                return;
            }
        }
    }
    public override void Update()
    {
        controller.velocity.x = controller.movement.WalkSpeedFast * Init_direction;

        if (controller.Inputter.x > 0.05f)
        {
            controller.x_direction = 1;
        }
        else if (controller.Inputter.x < -0.05f)
        {
            controller.x_direction = -1;
        }

        if (controller.BfAction == BufferedAction.ATTACK)
        {
            controller.velocity.x = 0;
            DoTransition(typeof(FitState_AM_GroundAttack));
            return;
        }

        if (controller.BfAction == BufferedAction.SPECIAL)
        {
            DoTransition(typeof(FitState_AM_GroundSpecial));
            return;
        }

        if (controller.BfAction == BufferedAction.JUMP)
        {
            DoTransition(typeof(FitState_AM_JumpSquat));
            return;
        }
        if (controller.IsGrounded(controller.groundedLookAhead) == false)
        {
            DoTransition(typeof(FitState_AM_Fall));
            return;
        }

        if (Init_direction != controller.x_direction)
        {
            DoTransition(typeof(FitState_AM_Pivot));
        }
        if (Mathf.Abs(controller.Inputter.x) >= 0.7f && controller.Inputter.FramesXNeutral <= 2)
        {
            DoTransition(typeof(FitState_AM_InitDash));
            return;
        }
        if (Mathf.Abs(controller.Inputter.x) < 0.5f)
        {
            DoTransition(typeof(FitState_AM_WalkSlow));
            return;
        }


        if (controller.BfAction == BufferedAction.SHIELD)
        {
            DoTransition(typeof(FitState_AM_ShieldEnter));
            return;
        }

        if (Mathf.Abs(controller.Inputter.x) <= 0.05f)
        {
            controller.ClearBuffer();
            DoTransition(typeof(FitState_AM_Idle));
            return;
        }

        if (controller.Inputter.y <= -0.65f)
        {
            if (controller.Inputter.FramesYNeutral <= 5 && controller.OnPassThrough(controller.groundedLookAhead))
            {
                DoTransition(typeof(FitState_AM_Pass));
                return;
            }
            else
            {
                DoTransition(typeof(FitState_AM_Crouch));
                return;
            }
        }
    }
    public override void Update()
    {
        //				controller.Inputter.GetInput ();
        //				controller.Inputter.ProcessInput ();

        AnimTimer += 1;

        if (controller.IsGrounded(controller.groundedLookAhead) == false)
        {
            DoTransition(typeof(FitState_AM_Fall));
            return;
        }

        CheckIASA();

        if (controller.Inputter.y > -0.60f && AnimTimer >= 2)
        {
            HoldDown = false;
        }

        if (AnimTimer == 2 && HoldDown)
        {
            controller.FitAnima.Play("Shielding");
        }

        if (AnimTimer == 3 && HoldDown)
        {
            if (controller.Inputter.y <= -0.65f && controller.Inputter.y >= -0.85f && controller.OnPassThrough(controller.groundedLookAhead))
            {
                DoTransition(typeof(FitState_AM_Pass));
                return;
            }
            else
            {
            }
        }

        if (controller.EndAnim == true || AnimTimer == 8)
        {
            controller.EndAnim = false;
            DoTransition(typeof(FitState_AM_Shield));
            return;
        }
    }