add some refs on line rasterization
GitOrigin-RevId: 728b18264f1414b9bb3d8fb773331b69eca340d4
This commit is contained in:
parent
11da38ffa6
commit
adaa9edc5e
@ -38,6 +38,8 @@ namespace Jumpy {
|
|||||||
Rectangle oldBbox = new Rectangle(oldPosition.X - spriteWidth, oldPosition.Y - 7, spriteWidth * 2, 26);
|
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);
|
Rectangle playerBbox = new Rectangle(position.X - spriteWidth, position.Y - 7, spriteWidth * 2, 26);
|
||||||
bool standingOnGround = false;
|
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) {
|
foreach (var rect in collisionTargets) {
|
||||||
playerBbox = new Rectangle(position.X - spriteWidth, position.Y - 7, spriteWidth * 2, 26);
|
playerBbox = new Rectangle(position.X - spriteWidth, position.Y - 7, spriteWidth * 2, 26);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user