Add level, room, and game-object
This commit is contained in:
parent
c118f9657a
commit
26f22c248e
3 changed files with 45 additions and 0 deletions
17
modules/ces/component/game-object.scm
Normal file
17
modules/ces/component/game-object.scm
Normal file
|
@ -0,0 +1,17 @@
|
|||
(define-module (ces component game-object)
|
||||
#:pure
|
||||
#:use-module (scheme base)
|
||||
#:export (game-object?
|
||||
make-game-object
|
||||
game-object-entity-id
|
||||
game-object-sprite
|
||||
game-object-pos-x
|
||||
game-object-pos-y))
|
||||
|
||||
(define-record-type <game-object>
|
||||
(make-game-object entity-id sprite pos-x pos-y)
|
||||
game-object?
|
||||
(entity-id game-object-entity-id)
|
||||
(sprite game-object-sprite)
|
||||
(pos-x game-object-pos-x)
|
||||
(pos-y game-object-pos-y))
|
13
modules/ces/component/level.scm
Normal file
13
modules/ces/component/level.scm
Normal file
|
@ -0,0 +1,13 @@
|
|||
(define-module (ces component level)
|
||||
#:pure
|
||||
#:use-module (scheme base)
|
||||
#:export (level?
|
||||
make-level
|
||||
level-entity-id
|
||||
level-rooms))
|
||||
|
||||
(define-record-type <level>
|
||||
(make-level entity-id rooms)
|
||||
level?
|
||||
(entity-id level-entity-id)
|
||||
(rooms level-rooms))
|
15
modules/ces/component/room.scm
Normal file
15
modules/ces/component/room.scm
Normal file
|
@ -0,0 +1,15 @@
|
|||
(define-module (ces component room)
|
||||
#:pure
|
||||
#:use-module (scheme base)
|
||||
#:export (room?
|
||||
make-room
|
||||
room-entity-id
|
||||
room-background
|
||||
room-game-objects))
|
||||
|
||||
(define-record-type <room>
|
||||
(make-room entity-id background game-objects)
|
||||
room?
|
||||
(room-id room-entity-id)
|
||||
(background room-background)
|
||||
(game-objects room-game-objects))
|
Loading…
Reference in a new issue