Update level-manager

This commit is contained in:
nephryte 2024-05-25 04:26:06 -04:00
parent b8185fee2c
commit d9806b2f8b

View file

@ -8,14 +8,14 @@
#:use-module (ces entity)
#:use-module (ces entity-manager)
#:use-module (dom image)
#:use-module (game-core)
#:use-module (game game-objects)
#:export ())
#:export (create-player!
create-room!))
;; Player
(define (player? entity)
(and (game-object? entity)
(has-components? entity 'keyboard-input)))
;;(define (player? entity)
;; (and (game-object? entity)
;; (has-components? entity 'keyboard-input)))
(define player-sprite (make-image "assets/sprites/player.png"))
(define (create-player!)
@ -24,8 +24,8 @@
(make-inputs '() '() '()))))
;; Room
(define (room? entity)
(has-components? entity 'hitbox 'sprite)) ;; + 'room-objects ?
;;(define (room? entity)
;; (has-components? entity 'hitbox 'sprite)) ;; + 'room-objects ?
;; As it stands a game object is technically also a room.
;; This will not be the case in the future -- especially once tilemaps work.