diff options
Diffstat (limited to 'scenes/game.scm')
-rw-r--r-- | scenes/game.scm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scenes/game.scm b/scenes/game.scm index c7aaba7..30d2d5c 100644 --- a/scenes/game.scm +++ b/scenes/game.scm @@ -47,9 +47,9 @@ (define-class <character> (<node-2d>) (velocity #:getter velocity #:init-form (vec2 0.0 0.0)) - (walk-speed #:accessor walk-speed #:init-form 1.0) + (walk-speed #:accessor walk-speed #:init-form 1.2) (direction #:accessor direction #:init-form '(idle)) - (hitbox #:getter hitbox #:init-form (make-rect 0.0 0.0 32.0 32.0))) + (hitbox #:getter hitbox #:init-form (make-rect 8.0 0.0 16.0 16.0))) (define-class <stats> (<node-2d>) (player #:accessor player #:init-form #f #:init-keyword #:player)) @@ -93,23 +93,23 @@ (split-texture (load-image file-name) tile-width tile-height)) (define-asset player-atlas - (load-atlas "assets/images/thing.png" 32 32)) + (load-atlas "assets/images/lorenzo.png" 32 32)) (define-method (populate (player <player>)) (list (make <animated-sprite> #:name 'sprite #:atlas player-atlas - #:animations '((idle-right . #(0 1)) - (idle-left . #(2 3)) - (idle-front . #(0 1)) ; TODO - (idle-back . #(0 1)) ; TODO - (right . #(0 1)) - (left . #(2 3)) - (up . #(0 1)) ; TODO - (down . #(2 3))) ; TODO + #:animations '((idle-right . #(8 8 8 8 8 7 7 7 7 7)) + (idle-left . #(0 0 0 0 0 15 15 15 15 15)) + (idle-front . #(24 24 24 24 24 32 32 32 32 32)) + (idle-back . #(16)) + (left . #(1 35 2 35)) + (right . #(9 34 10 34)) + (up . #(17 16 18 16)) + (down . #(25 24 26 24))) #:current-animation 'idle-front - #:frame-duration 15))) + #:frame-duration 10))) (define-asset test-map (load-tile-map "assets/maps/01.tmx")) |