#ammo stuff
1 messages · Page 1 of 1 (latest)
as for the enum, it doesnt matter if its in a separate file. Whats line 13? theres no line numbers so i cant really tell
int shotsFired = ammo.Spend(ammoType, ammoPerShot);
I'm just wondering if ammoType is supposed to be replaced with ammo which is initialised in public AmmoType ammo; but I don't understand the point of calling it ammo if it's outside the scope of the method
just gonna paste the link again so i dont lose it
https://gamedev.stackexchange.com/questions/143294/how-to-link-my-weapons-with-their-corresponding-ammo-supply-in-the-unity-inspect#comment254985_143294
the naming kinda sucks cause they wrote public AmmoType ammo and the parameter is named ammo too
inside the function, its doing ammo.Spend but thats of type AmmoInventory, not the enum
So I guess I just change it to public AmmoType ammoType?
yea that should be fine, tbh i didnt fully read/understand the code but that first parameter looks like its trying to take the enum