コード例 #1
0
 void RegularDecisionTree(List <string> decisionBox, int minDiv, int maxDiv)
 {
     DecisionMade(minDiv, maxDiv);
     if (decisionBox[decision] == "WalkForward" && !animator.GetBool("isAttacking"))
     {
         AIcontrols.AIStand();
         AIcontrols.AIPressedForward();
         character.SetBackPressed(false);
     }
     else if (decisionBox[decision] == "WalkBackward")
     {
         AIcontrols.AIStand();
         AIcontrols.AIPressedBackward();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "Crouch")
     {
         AIcontrols.AICrouch();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "NeutralJump" && !animator.GetBool("isAttacking"))
     {
         sharedProperties.CharacterNeutralState();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "ForwardJump" && !animator.GetBool("isAttacking"))
     {
         AIcontrols.AIPressedForward();
         AIcontrols.AIJump();
         character.SetBackPressed(false);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Roundhouse")
     {
         AIcontrols.AIRoundhouse(2, 0);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Fierce")
     {
         AIcontrols.AIFierce(2, 0);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Forward")
     {
         AIcontrols.AIForward(2);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Strong")
     {
         AIcontrols.AIStrong(10);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Short")
     {
         AIcontrols.AIShort(40);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Jab")
     {
         AIcontrols.AIJab(50);
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "LowForward")
     {
         AIcontrols.AILowForward();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Sweep")
     {
         AIcontrols.AISweep();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "ScissorKick")
     {
         if (chargeSystem.GetBackCharged() && !animator.GetBool("isAttacking"))
         {
             AIScissorKicks();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(2);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "PsychoCrusher")
     {
         if (chargeSystem.GetDownCharged() && !animator.GetBool("isAttacking"))
         {
             AIPsychoCrushers();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "HeadStomp")
     {
         if (chargeSystem.GetDownCharged() && !animator.GetBool("isAttacking"))
         {
             AIHeadStomps();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "DevilsReverse")
     {
         if (chargeSystem.GetDownCharged() && !animator.GetBool("isAttacking"))
         {
             AIDevilsReverses();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 0);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelScissorKick")
     {
         if (chargeSystem.GetBackCharged())
         {
             AIScissorKicks();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(2);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelPsychoCrusher")
     {
         if (chargeSystem.GetBackCharged())
         {
             AIPsychoCrushers();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelHeadStomp")
     {
         if (chargeSystem.GetDownCharged())
         {
             AIHeadStomps();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 1);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "SpecialCancelDevilsReverse")
     {
         if (chargeSystem.GetDownCharged())
         {
             AIDevilsReverses();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AILightAttacks(50, 0);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         decisionTimer = 0f;
     }
     else if (decisionBox[decision] == "Super")
     {
         if (character.GetSuper >= 100f)
         {
             AIKneePressNightmares();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AICrouch();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
     }
     else if (decisionBox[decision] == "SuperOnBlock")
     {
         if (character.GetSuper >= 100f)
         {
             AIKneePressNightmares();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(3);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
     }
     else if (decisionBox[decision] == "SuperOnHit")
     {
         if (character.GetSuper >= 100f)
         {
             AIKneePressNightmares();
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
         else
         {
             AIcontrols.AIForward(10);
             AIcontrols.AICharges();
             character.SetBackPressed(true);
         }
     }
     else if (decisionBox[decision] == "Throw")
     {
         AIcontrols.AIThrow();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirStrong")
     {
         AIcontrols.AIJumpStrong();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirForward")
     {
         AIcontrols.AIJumpForwardAttack();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirFierce")
     {
         AIcontrols.AIJumpFierce();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
     else if (decisionBox[decision] == "AirRoundhouse")
     {
         AIcontrols.AIJumpRoundhouse();
         AIcontrols.AICharges();
         character.SetBackPressed(true);
     }
 }