public override void MakeDecision(AgentHandler agentScript) { if (agentScript.SelectedWeapon == WeaponSelected.RocketLauncher && agentScript.GetFireprojectileTimer() >= agentScript.RocketLauncherFireRate) { RunChildDecision(agentScript, true); } else { RunChildDecision(agentScript, false); } }
public override void MakeDecision(AgentHandler agentScript) { float requiredTime = (agentScript.SelectedWeapon == WeaponSelected.MachineGun) ? agentScript.MachineGunFireRate : agentScript.RocketLauncherFireRate; if (agentScript.GetFireprojectileTimer() >= requiredTime) { RunChildDecision(agentScript, true); } else { RunChildDecision(agentScript, false); } }