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
I actually started using GunsAndBullets1 for a project of mine, and after examining it closely, I had a few suggestions for both that class and this one (I gradually wrote my own version which differs quite substantially from this one).
There is no need to ever call the Update() function in this class. Using coroutines makes it much easier to implement things like burst fire. Automatic fire with coroutines is a bit trickier, but ultimately coroutines are much more flexible since they are only ever triggered when the player fires.
The use of the Queue for cycling through barrels is a bit excessive and leads to a bit of garbage collection. I actually found that this breaks on certain android builds for some reason. A simple index and modulo operation is all that is needed (ie:
I actually started using GunsAndBullets1 for a project of mine, and after examining it closely, I had a few suggestions for both that class and this one (I gradually wrote my own version which differs quite substantially from this one).
The text was updated successfully, but these errors were encountered: