mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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
|
||||
if px >= screenHeight-padding {
|
||||
px = screenHeight - padding - 1
|
||||
if px >= screenWidth-padding {
|
||||
px = screenWidth - padding - 1
|
||||
}
|
||||
|
||||
if px <= padding {
|
||||
px = padding + 1
|
||||
}
|
||||
|
||||
if py >= screenWidth-padding {
|
||||
py = screenWidth - padding - 1
|
||||
if py >= screenHeight-padding {
|
||||
py = screenHeight - padding - 1
|
||||
}
|
||||
|
||||
if py <= padding {
|
||||
|
Loading…
Reference in New Issue
Block a user