Rename core interface functions
This commit is contained in:
parent
be814a05da
commit
a6b767a943
2 changed files with 9 additions and 10 deletions
|
|
@ -1,4 +1,4 @@
|
|||
(module (engine core) *
|
||||
(module (engine core) (add-entity add-named-entity remove-entity)
|
||||
(import scheme
|
||||
(chicken base)
|
||||
;; raylib
|
||||
|
|
@ -87,18 +87,17 @@
|
|||
del-entity-queue)
|
||||
(set! del-entity-queue '()))
|
||||
|
||||
;; Create an instance of an entity in the world and return it's ID
|
||||
(define (add-instance-named id . components)
|
||||
;; Create an entity in the world and return it's ID
|
||||
(define (add-named-entity id . components)
|
||||
(queue-add-entity id components)
|
||||
id)
|
||||
|
||||
;; Shortcut for anonymous instancing
|
||||
(define (add-instance . components)
|
||||
(apply add-instance-named (gensym) components))
|
||||
(define (add-entity . components)
|
||||
(apply add-named-entity (gensym) components))
|
||||
|
||||
;; Remove an instance from the world
|
||||
(define (remove-instance id)
|
||||
;; Remove an entity from the world
|
||||
(define (remove-entity id)
|
||||
(queue-del-entity id)
|
||||
id)
|
||||
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue