X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=games%2Fguybrush%2Fguybrush.scm;fp=games%2Fguybrush%2Fguybrush.scm;h=66e58e3844ddd47ecb69a11193029353380b901f;hb=8c11779c29d94a8c7702aae0964180252638dc10;hp=967c4de979bc69d39b91e67498dda4b8fcbc7e97;hpb=f14c83835a29a6d94daf3b0dcfe88f59d8844e34;p=gacela.git diff --git a/games/guybrush/guybrush.scm b/games/guybrush/guybrush.scm index 967c4de..66e58e3 100644 --- a/games/guybrush/guybrush.scm +++ b/games/guybrush/guybrush.scm @@ -10,10 +10,14 @@ (define-mob (guybrush (guy (load-texture "guybrush.png")) (x 0) - (y (- (/ (assoc-ref (get-game-properties) 'height) 2)))) + (y (+ (- (/ (assoc-ref (get-game-properties) 'height) 2)) + (/ (assoc-ref (get-texture-properties guy) 'height) 2)))) + + (cond ((key? 'left) (set! x (- x 10)))) + (cond ((key? 'right) (set! x (+ x 10)))) + (translate x y) (draw-texture guy)) (show-mob (guybrush)) -;; Tengo que hacer una función para obtener propiedades de textura en video.scm \ No newline at end of file