Closed flip40 closed 8 years ago
Ah this should have been bundled with the other changes to Weapon. Projectile used to maintain it's refireTime and refireDelay instead of the Weapon.
Yeah, probably. Didn't notice the discrepancy until now though.
No worries, I need to review the code I add or change more before pushing
Well to be fair, Pull Requests exist for code review purposes, so it is also somewhat my fault for missing it as well. Either way, it isn't broken code so nbd.
Closed by #66
Just a thought, why does a weapon necessarily need to shoot objects that have the Projectile class?
For example, we could have a "weapon" (at least, it would work in place of one) that simply deploys drones or turrets (or drop bombs?), which might not have the Projectile class.
While doing this would allow someone to create a weapon that would "shoot" something silly like another player object, I think it is fine to leave it up to the developer to not create a weapon that uses an inappropriate GameObject as its Projectile rather than have an implied code restriction on what GameObjects could be instantiated by a Weapon.
Looking at the Weapon class, it looks like it does actually store bullets in a GameObject array, however we are also implicitly getting Projectile classes from these objects, which I don't think we need to do.