zombiepaladin / DungeonCrawler

4 stars 10 forks source link

Collisions update #15

Closed matthewmchaney closed 12 years ago

matthewmchaney commented 12 years ago

Added a CollisionsComponent which has collideables. This way we can represent rectangles and circles for hitboxes simultaneously. There's a cost of having duplicate data (circle bounds share the center/radius of the position component) that is complicated by having components do little to no logic. But oh well, it should be okay.

RectangleBounds have their position in the upper left, so watch out for that.

There still needs to be an implementation for doors/walls that are loaded in through the level. This is just the basic structure for the collision method.