Honestly, I'd use mesh collision whenever possible. It allows the best possible resoloution, and you don't need five billion if/then statements.
All you need is something to store the points of many triangles - objects make that easy.
Then when you want to check for collisions, just raycast between two lines.
Here's a bit of my raycast code - checks to see if two lines cross each other. This should help you alot - and I'd change the x1, y1 to vector2s... I wrote this a while ago, so yeah.... I haven't fixed that to a more standard use yet. Hope this helps... It's probly overkill maybe, but it's flexible.
| private Boolean LineCross(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) |
| { |
| //calculations |
| float m1, m2; |
| float b1, b2; |
| float sx, sy; |
| |
| |
| //first slope& |