...
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user