You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should probably not have a new ammo-component, and I started implementing an inventory-component.
But changing the weaponactioncomponent to a inventory-component that has an or separate object(s) with ITEMS, WEAPONS, AND AMMUNITION and then an ACTIVE WEAPON and ACTIVE AMMUNITION - this could keep track of everything for the given entity.
Since it already triggers the shooting from input its easy to reduce ACTIVE ammo after a successfull shot is made, its easy to change weapon and ammo - as long as every weapon has a basic shoot function with a true/false return if it actually fired!
This also makes it possible to send an updateHUD signal when the ammo, weapon changes or reduces etc... (As well as a list of available ammo, weapons...)
A weapon should have ammo, ammo-max and clip-size for firing e.g. bullets!
The text was updated successfully, but these errors were encountered: