|
@@ -1,3 +1,7 @@
|
|
|
|
|
+// This example shows a stack of boxes and the player has a circle that can push the boxes.
|
|
|
|
|
+//
|
|
|
|
|
+// This example needs some cleaning up: It leaks lots of box2D things and can perhaps be done more
|
|
|
|
|
+// compactly. Originally made during a 1h stream: https://www.youtube.com/watch?v=LYW7jdwEnaI
|
|
|
package karl2d_box2d_example
|
|
package karl2d_box2d_example
|
|
|
|
|
|
|
|
import b2 "vendor:box2d"
|
|
import b2 "vendor:box2d"
|
|
@@ -132,7 +136,6 @@ step :: proc() -> bool {
|
|
|
return !k2.shutdown_wanted()
|
|
return !k2.shutdown_wanted()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
shutdown :: proc() {
|
|
shutdown :: proc() {
|
|
|
b2.DestroyWorld(world_id)
|
|
b2.DestroyWorld(world_id)
|
|
|
k2.shutdown()
|
|
k2.shutdown()
|