Don't remove entities/world when disposing the world
This commit is contained in:
@@ -82,12 +82,9 @@
|
|||||||
:entities entities
|
:entities entities
|
||||||
:options options
|
:options options
|
||||||
:show (fn []
|
:show (fn []
|
||||||
; if using a physics engine in a REPL, we need to forcibly remove
|
; if using a physics engine in a REPL, we need to forcibly dispose
|
||||||
; the entities and world so they are cleaned up properly
|
; the world so it is cleaned up properly
|
||||||
(when (:world @screen)
|
(some-> @screen :world :object .dispose)
|
||||||
(update-screen! @screen (reset! entities []))
|
|
||||||
(some-> @screen :world :object .dispose)
|
|
||||||
(update-fn! dissoc [:world]))
|
|
||||||
; set the initial values in the screen map
|
; set the initial values in the screen map
|
||||||
(update-fn! assoc
|
(update-fn! assoc
|
||||||
[:total-time 0
|
[:total-time 0
|
||||||
|
|||||||
Reference in New Issue
Block a user