Esempio n. 1
0
 public override void MakeDecision(AgentHandler agentScript)
 {
     if (agentScript.GetEnergy() >= agentScript.GetRocketLauncherEnergyCost())
     {
         RunChildDecision(agentScript, true);
     }
     else
     {
         RunChildDecision(agentScript, false);
     }
 }
 public override void MakeDecision(AgentHandler agentScript)
 {
     if (agentScript.GetEnergy() > 10)
     {
         RunChildDecision(agentScript, true);
     }
     else
     {
         RunChildDecision(agentScript, false);
     }
 }
    public override void MakeDecision(AgentHandler agentScript)
    {
        float requiredEnergy = (agentScript.SelectedWeapon == WeaponSelected.MachineGun) ? agentScript.GetMachineGunEnergyCost() : agentScript.GetRocketLauncherEnergyCost();

        if (agentScript.GetEnergy() >= requiredEnergy)
        {
            RunChildDecision(agentScript, true);
        }
        else
        {
            RunChildDecision(agentScript, false);
        }
    }