mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-04 15:04:28 +01:00
examples/raycasting: fix bug, swap height and width (#1067)
This commit is contained in:
parent
ad84bf812f
commit
69dc54232c
@ -187,16 +187,16 @@ func handleMovement() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// +1/-1 is to stop player before it reaches the border
|
// +1/-1 is to stop player before it reaches the border
|
||||||
if px >= screenHeight-padding {
|
if px >= screenWidth-padding {
|
||||||
px = screenHeight - padding - 1
|
px = screenWidth - padding - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if px <= padding {
|
if px <= padding {
|
||||||
px = padding + 1
|
px = padding + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if py >= screenWidth-padding {
|
if py >= screenHeight-padding {
|
||||||
py = screenWidth - padding - 1
|
py = screenHeight - padding - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if py <= padding {
|
if py <= padding {
|
||||||
|
Loading…
Reference in New Issue
Block a user