Handle collisions in separate class
I am currently coding for the Ludum Dare I need to be able to handle
collisions from a top-down perspective. I know how to handle them
normally, but I am going to be including a lot of things that can be run
into, so I would like to handle collisions from a bool return in a
separate class. The way I would do it is give the function the input
rectangle for the player collision box and then store all of the
collisions in the function. However if I do it that way then I will have
to check every single time I move if I run into something. Is there a
better way to do this?
No comments:
Post a Comment