예제 #1
0
 protected void CheckForSpecialAttack(SCS_SpecialAttack specialAtk, int specCount)
 {
     if (specCount < specialAtk.aerialLimit || specialAtk.aerialLimit == 0)
     {
         if (ComboPower >= specialAtk.comboPowerCost)
         {
             ModifiyComboPower(-specialAtk.comboPowerCost);
             ChrSM.ChangeState(this, specialAtk);
         }
     }
 }
예제 #2
0
    public override void SCS_CheckForAerials()
    {
        if (Attack)
        {
            if (DirectionalInput == Vector2.zero)
            {
                ChrSM.ChangeState(this, nAirAtk);
            }
            else if (Mathf.Abs(DirectionalInput.x) > 0.5f && Mathf.Sign(DirectionalInput.x) == Direction)
            {
                ChrSM.ChangeState(this, fAirAtk);
            }
            else if (Mathf.Abs(DirectionalInput.x) > 0.5f && Mathf.Sign(DirectionalInput.x) != Direction)
            {
                ChrSM.ChangeState(this, bAirAtk);
            }
            else if (DirectionalInput.y > 0.5f)
            {
                ChrSM.ChangeState(this, uAirAtk);
            }
            else if (DirectionalInput.y < -0.5f)
            {
                ChrSM.ChangeState(this, dAirAtk);
            }
        }

        if (TiltInput != Vector2.zero)
        {
            if (Mathf.Abs(TiltInput.x) > 0.5f && Mathf.Sign(TiltInput.x) == Direction)
            {
                ChrSM.ChangeState(this, fAirAtk);
            }
            else if (Mathf.Abs(TiltInput.x) > 0.5f && Mathf.Sign(TiltInput.x) != Direction)
            {
                ChrSM.ChangeState(this, bAirAtk);
            }
            else if (TiltInput.y > 0.5f)
            {
                ChrSM.ChangeState(this, uAirAtk);
            }
            else if (TiltInput.y < -0.5f)
            {
                ChrSM.ChangeState(this, dAirAtk);
            }
        }

        SCS_CheckForSpecials();
    }
예제 #3
0
    public override void SCS_CheckForGroundAttacks()
    {
        if (Attack)
        {
            if (DirectionalInput == Vector2.zero)
            {
                ChrSM.ChangeState(this, jabAtk);
            }
            else if (Mathf.Abs(DirectionalInput.x) > 0.5f)
            {
                ChrSM.ChangeState(this, fTiltAtk);
            }
            else if (DirectionalInput.y > 0.5f)
            {
                ChrSM.ChangeState(this, uTiltAtk);
            }
            else if (DirectionalInput.y < -0.5f)
            {
                ChrSM.ChangeState(this, dTiltAtk);
            }
        }
        else if (TiltInput != Vector2.zero)
        {
            if (Mathf.Abs(TiltInput.x) > 0.5f)
            {
                Direction = TiltInput.x;

                ChrSM.ChangeState(this, fTiltAtk);
            }
            else if (TiltInput.y > 0.5f)
            {
                ChrSM.ChangeState(this, uTiltAtk);
            }
            else if (TiltInput.y < -0.5f)
            {
                ChrSM.ChangeState(this, dTiltAtk);
            }
        }

        SCS_CheckForSpecials();
    }