public void Behaviors()
 {
     decisionTimer--;
     antiAirTimer--;
     if (AIcontrols.FreeToMakeDecisions() && !TimeControl.inSuperStartup[0] && !TimeControl.inSuperStartup[1])
     {
         if (animator.GetBool("isAirborne") == true && animator.GetBool("isLiftingOff") == false)
         {
             decision = Random.Range(0, 100);
             if (decision <= 3)
             {
                 AIcontrols.AIJumpFierce();
                 sharedProperties.CharacterNeutralState();
             }
             else if (decision <= 6 && decision > 3)
             {
                 AIcontrols.AIJumpRoundhouse();
                 sharedProperties.CharacterNeutralState();
             }
         }
         else if (sharedProperties.GetAbDistanceFromOtherFighter() >= 2f)
         {
             RegularFarRangeDecisions();
         }
         else if (sharedProperties.GetAbDistanceFromOtherFighter() < 2f && sharedProperties.GetAbDistanceFromOtherFighter() >= 1f)
         {
             if (player != null)
             {
                 if (playerCharacter.GetBlockStunned() == true)
                 {
                     MidRangeOtherFighterBlockedDecisions();
                 }
                 else if (playerCharacter.GetKnockDown() == true && playerCharacter.GetAirborne() == false)
                 {
                     KnockDownMidRangeDecisions();
                 }
                 else
                 {
                     RegularMidRangeDecisions();
                 }
             }
             else if (opponent != null)
             {
                 if (opponentCharacter.GetBlockStunned() == true)
                 {
                     MidRangeOtherFighterBlockedDecisions();
                 }
                 else if (opponentCharacter.GetKnockDown() == true && opponentCharacter.GetAirborne() == false)
                 {
                     KnockDownMidRangeDecisions();
                 }
                 else
                 {
                     RegularMidRangeDecisions();
                 }
             }
         }
         else
         {
             if (player != null)
             {
                 //anti air
                 if (playerCharacter.GetAirborne() == true && playerCharacter.GetKnockDown() == false && playerCharacter.GetThrown() == false)
                 {
                     if (antiAirTimer <= 0f)
                     {
                         sharedProperties.AIAntiAirDecision(67, RegularCloseRangeDecisions, PreparationForAntiAir);
                         antiAirTimer = antiAirTimerInput;
                     }
                     else
                     {
                         RegularCloseRangeDecisions();
                     }
                 }
                 //other guy got hit
                 else if (playerCharacter.GetHitStunned() == true)
                 {
                     OtherFighterGotHitDecisions();
                 }
                 //other guy got knocked down
                 else if (playerCharacter.GetKnockDown() == true && playerCharacter.GetAirborne() == false)
                 {
                     KnockDownCloseRangeDecisions();
                 }
                 //other guy blocked
                 else if (playerCharacter.GetBlockStunned() == true)
                 {
                     CloseRangeOtherFighterBlockedDecisions();
                 }
                 else
                 {
                     RegularCloseRangeDecisions();
                 }
             }
             else if (opponent != null)
             {
                 //anti air
                 if (opponentCharacter.GetAirborne() == true && opponentCharacter.GetKnockDown() == false && opponentCharacter.GetThrown() == false)
                 {
                     if (antiAirTimer <= 0f)
                     {
                         sharedProperties.AIAntiAirDecision(67, RegularCloseRangeDecisions, PreparationForAntiAir);
                         antiAirTimer = antiAirTimerInput;
                     }
                     else
                     {
                         RegularCloseRangeDecisions();
                     }
                 }
                 //other guy got hit
                 else if (opponentCharacter.GetHitStunned() == true)
                 {
                     OtherFighterGotHitDecisions();
                 }
                 //other guy got knocked down
                 else if (opponentCharacter.GetKnockDown() == true && opponentCharacter.GetAirborne() == false)
                 {
                     KnockDownCloseRangeDecisions();
                 }
                 //other guy blocked
                 else if (opponentCharacter.GetBlockStunned() == true)
                 {
                     CloseRangeOtherFighterBlockedDecisions();
                 }
                 else
                 {
                     RegularCloseRangeDecisions();
                 }
             }
         }
         AIcontrols.AIWalks();
     }
 }
Exemple #2
0
    public void Behaviors()
    {
        decisionTimer--;
        antiAirTimer--;

        if (AIcontrols.FreeToMakeDecisions() && !TimeControl.inSuperStartup[0] && !TimeControl.inSuperStartup[1])
        {
            if (animator.GetBool("isAirborne") == true && animator.GetBool("isLiftingOff") == false)
            {
                if (animator.GetBool("hyakkishuActive") == true)
                {
                    HyakkishuDecisions();
                }
                else
                {
                    AirborneAttacks();
                }
            }
            else if (sharedProperties.GetAbDistanceFromOtherFighter() >= 2f)
            {
                RegularFarRangeDecisions();
            }
            else if (sharedProperties.GetAbDistanceFromOtherFighter() < 2f && sharedProperties.GetAbDistanceFromOtherFighter() >= 1f)
            {
                if (player != null)
                {
                    if (playerCharacter.GetBlockStunned() == true)
                    {
                        MidRangeOtherFighterBlockedDecisions();
                    }
                    else if (playerCharacter.GetKnockDown() == true && playerCharacter.GetAirborne() == false)
                    {
                        KnockDownMidRangeDecisions();
                    }
                    else
                    {
                        RegularMidRangeDecisions();
                    }
                }
                else if (opponent != null)
                {
                    if (opponentCharacter.GetBlockStunned() == true)
                    {
                        MidRangeOtherFighterBlockedDecisions();
                    }
                    else if (opponentCharacter.GetKnockDown() == true && opponentCharacter.GetAirborne() == false)
                    {
                        KnockDownMidRangeDecisions();
                    }
                    else
                    {
                        RegularMidRangeDecisions();
                    }
                }
            }
            else
            {
                if (player != null)
                {
                    if (playerCharacter.GetAirborne() == true && playerCharacter.GetKnockDown() == false && !inComboSequence)
                    {
                        if (antiAirTimer <= 0f)
                        {
                            sharedProperties.AIAntiAirDecision(65, RegularCloseRangeDecisions, PreparationForAntiAir);
                            antiAirTimer = antiAirTimerInput;
                        }
                        else
                        {
                            RegularCloseRangeDecisions();
                        }
                    }
                    else if (playerCharacter.GetKnockDown() == true && playerCharacter.GetAirborne() == false)
                    {
                        KnockDownCloseRangeDecisions();
                    }
                    else if (playerCharacter.GetBlockStunned() == true)
                    {
                        CloseRangeOtherFighterBlockedDecisions();
                    }
                    else if (playerCharacter.GetHitStunned() == true)
                    {
                        OtherFighterGotHitDecisions();
                    }
                    else
                    {
                        RegularCloseRangeDecisions();
                    }
                }
                else if (opponent != null)
                {
                    if (opponentCharacter.GetAirborne() == true && opponentCharacter.GetKnockDown() == false && !inComboSequence)
                    {
                        if (antiAirTimer <= 0f)
                        {
                            sharedProperties.AIAntiAirDecision(65, RegularCloseRangeDecisions, PreparationForAntiAir);
                            antiAirTimer = antiAirTimerInput;
                        }
                        else
                        {
                            RegularCloseRangeDecisions();
                        }
                    }
                    else if (opponentCharacter.GetKnockDown() == true && opponentCharacter.GetAirborne() == false)
                    {
                        KnockDownCloseRangeDecisions();
                    }
                    else if (opponentCharacter.GetHitStunned() == true)
                    {
                        OtherFighterGotHitDecisions();
                    }
                    else
                    {
                        RegularCloseRangeDecisions();
                    }
                }
            }
        }
        AIcontrols.AIWalks();
    }
Exemple #3
0
 public void Behaviors()
 {
     decisionTimer--;
     antiAirTimer--;
     if (AIcontrols.FreeToMakeDecisions() && !TimeControl.inSuperStartup[0] && !TimeControl.inSuperStartup[1])
     {
         if (animator.GetBool("isAirborne") == true && animator.GetBool("isLiftingOff") == false)
         {
             decision = Random.Range(0, 100);
             if (decision <= 1)
             {
                 AIcontrols.AIJumpFierce();
             }
             else if (decision <= 6 && decision > 1)
             {
                 AIcontrols.AIJumpRoundhouse();
             }
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else if (character.GetKnockDown() == true)
         {
             AIcontrols.AICrouch();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else if (sharedProperties.GetAbDistanceFromOtherFighter() >= 2f)
         {
             if (player != null)
             {
                 if (playerCharacter.GetKnockDown() == true && playerCharacter.GetAirborne() == false)
                 {
                     KnockDownFromFarDecisions();
                 }
                 else if (playerCharacter.GetComponent <Ken>() != null || playerCharacter.GetComponent <Sagat>() != null)
                 {
                     DecisionMade(5, 1);
                     VsKenFromDistanceDecisions();
                 }
                 else
                 {
                     RegularFarRangeDecisions();
                 }
             }
             else if (opponent != null)
             {
                 if (opponentCharacter.GetKnockDown() == true && opponentCharacter.GetAirborne() == false)
                 {
                     KnockDownFromFarDecisions();
                 }
                 else if (opponentCharacter.GetComponent <Ken>() != null || opponentCharacter.GetComponent <Sagat>() != null)
                 {
                     DecisionMade(5, 1);
                     VsKenFromDistanceDecisions();
                 }
                 else
                 {
                     RegularFarRangeDecisions();
                 }
             }
         }
         else if (sharedProperties.GetAbDistanceFromOtherFighter() >= 1f && sharedProperties.GetAbDistanceFromOtherFighter() < 2f)
         {
             if (player != null)
             {
                 if (playerCharacter.GetKnockDown() == true && playerCharacter.GetAirborne() == false)
                 {
                     KnockDownFromMidRangeDecisions();
                 }
                 else
                 {
                     RegularMidRangeDecisions();
                 }
             }
             else if (opponent != null)
             {
                 if (opponentCharacter.GetKnockDown() == true && opponentCharacter.GetAirborne() == false)
                 {
                     KnockDownFromMidRangeDecisions();
                 }
                 else
                 {
                     RegularMidRangeDecisions();
                 }
             }
         }
         else
         {
             if (player != null)
             {
                 if (playerCharacter.GetBlockStunned() == true)
                 {
                     OtherFighterBlockedDecisions();
                 }
                 else if (playerCharacter.GetHitStunned() == true)
                 {
                     OtherFighterGotHitDecisions();
                 }
                 else if (playerCharacter.GetKnockDown() == true && playerCharacter.GetAirborne() == false)
                 {
                     KnockDownFromCloseRangeDecisions();
                 }
                 else if (playerCharacter.GetAirborne() == true && playerCharacter.GetKnockDown() == false && playerCharacter.GetThrown() == false)
                 {
                     if (antiAirTimer <= 0f)
                     {
                         sharedProperties.AIAntiAirDecision(60, RegularCloseRangeDecisions, PreparationForAntiAir);
                         antiAirTimer = antiAirTimerInput;
                     }
                     else
                     {
                         RegularCloseRangeDecisions();
                     }
                 }
                 else
                 {
                     RegularCloseRangeDecisions();
                 }
             }
             else if (opponent != null)
             {
                 if (opponentCharacter.GetBlockStunned() == true)
                 {
                     OtherFighterBlockedDecisions();
                 }
                 else if (opponentCharacter.GetHitStunned() == true)
                 {
                     OtherFighterGotHitDecisions();
                 }
                 else if (opponentCharacter.GetKnockDown() == true && opponentCharacter.GetAirborne() == false)
                 {
                     KnockDownFromCloseRangeDecisions();
                 }
                 else if (opponentCharacter.GetAirborne() == true && opponentCharacter.GetKnockDown() == false && opponentCharacter.GetThrown() == false)
                 {
                     if (antiAirTimer <= 0f)
                     {
                         sharedProperties.AIAntiAirDecision(60, RegularCloseRangeDecisions, PreparationForAntiAir);
                         antiAirTimer = antiAirTimerInput;
                     }
                     else
                     {
                         RegularCloseRangeDecisions();
                     }
                 }
                 else
                 {
                     RegularCloseRangeDecisions();
                 }
             }
         }
         AIcontrols.AIWalks();
     }
 }