JeLLyNinjas / TerminalFighter

5 stars 2 forks source link

Location of get_hitboxes() #64

Closed beaesguerra closed 8 years ago

beaesguerra commented 8 years ago

Currently, the get_hitboxes() is a virtual function declared in the sensor, projectile, and ship classes. Wouldn't it make more sense if it was declared in the game object class?

bseto commented 8 years ago

I think it'd make sense if it was abstracted a level up. But if you do this, you'll also have to remember to move up the SDL_Rect hitbox_; from sensor, projectile and ship classes.

enochtsang commented 8 years ago

Certain gameobjects could possibly not have hitboxes, like a spawner. Overall, keeping these functions where they currently are has little or no penalty, but if we move it to gameobject, there could be possibly a large penalty later.