Game Development Reference
In-Depth Information
The shoot action
Shooting requires the same modification to the ammunition and merely decrements the
blackboard's ammo attribute instead of a userData value:
SoldierActions.lua :
function SoldierActions_ShootUpdate(deltaTimeInMillis,
userData)
...
userData.blackboard:Set(
"ammo", userData.blackboard:Get("ammo") - 1);
end
return Action.Status.TERMINATED;
end
Search WWH ::




Custom Search