Game Development Reference
In-Depth Information
Has ammo evaluator
Next, we can perform a simple ammo check to see whether the agent has any remaining
ammo, as well as the inverse to check whether the agent has no ammo:
SoldierEvaluators.lua :
function SoldierEvaluators_HasAmmo(userData)
return userData.ammo ~= nil and userData.ammo > 0;
end
function SoldierEvaluators_HasNoAmmo(userData)
return not SoldierEvaluators_HasAmmo(userData);
end
Search WWH ::




Custom Search