Add functions to clear ECS state

This commit is contained in:
BirDt_ 2026-03-29 02:16:56 +08:00
parent af50ef7c09
commit 5c19a5f3a6

View file

@ -120,6 +120,12 @@
(queue-del-entity id)
id)
;; Clear the entire world
(define (clear-world)
(for-each
remove-entity
(hash-table-keys world)))
;; System record interface
(export make-system system? system-name system-rendering
system-priority set-system-priority! system-criteria
@ -235,6 +241,11 @@
(queue-del-system name)
name)
(define (clear-systems)
(for-each
remove-system
(map system-name systems)))
;; Execute a single system
;; TODO: Implement
(define (execute-system system)