|
|
@ -38,6 +38,8 @@ namespace Jumpy { |
|
|
|
Rectangle oldBbox = new Rectangle(oldPosition.X - spriteWidth, oldPosition.Y - 7, spriteWidth * 2, 26); |
|
|
|
Rectangle playerBbox = new Rectangle(position.X - spriteWidth, position.Y - 7, spriteWidth * 2, 26); |
|
|
|
bool standingOnGround = false; |
|
|
|
// TODO: implement https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
|
|
|
|
// e.g. http://members.chello.at/~easyfilter/bresenham.html
|
|
|
|
foreach (var rect in collisionTargets) { |
|
|
|
playerBbox = new Rectangle(position.X - spriteWidth, position.Y - 7, spriteWidth * 2, 26); |
|
|
|
|
|
|
|