예제 #1
0
 public override void MakeDecision(AgentHandler agentScript)
 {
     if (agentScript.SelectedWeapon == WeaponSelected.RocketLauncher && agentScript.GetFireprojectileTimer() >= agentScript.RocketLauncherFireRate)
     {
         RunChildDecision(agentScript, true);
     }
     else
     {
         RunChildDecision(agentScript, false);
     }
 }
예제 #2
0
    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);
        }
    }