This commit is contained in:
nub31
2025-09-28 22:53:09 +02:00
parent 87155de49d
commit 0efde77d2c
2 changed files with 13 additions and 3 deletions

View File

@@ -28,6 +28,16 @@ extern "main" func main(args: []cstring): i64
}
raylib::EndDrawing()
if x + width > raylib::GetScreenWidth()
{
direction.x = -direction.x
}
if y + height > raylib::GetScreenHeight()
{
direction.y = -direction.y
}
x = x + @floatToInt(i32, direction.x)
y = y + @floatToInt(i32, direction.y)
}