Add functions to clear ECS state
This commit is contained in:
parent
af50ef7c09
commit
5c19a5f3a6
1 changed files with 11 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue