Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement AMMO- component #15

Closed
sivertsenstian opened this issue Feb 1, 2015 · 2 comments
Closed

Implement AMMO- component #15

sivertsenstian opened this issue Feb 1, 2015 · 2 comments
Assignees

Comments

@sivertsenstian
Copy link
Owner

A weapon should have ammo, ammo-max and clip-size for firing e.g. bullets!

@sivertsenstian
Copy link
Owner Author

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...)

@sivertsenstian
Copy link
Owner Author

Will wait a bit with clip size and reload until i feel the ammo/inventory works - but should not be hard to implement in current scheme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant