]> git.jsancho.org Git - gacela.git/commitdiff
(no commit message)
authorjsancho <devnull@localhost>
Thu, 30 Jun 2011 19:30:01 +0000 (19:30 +0000)
committerjsancho <devnull@localhost>
Thu, 30 Jun 2011 19:30:01 +0000 (19:30 +0000)
src/gacela_mobs.scm

index 5ae3296ab0287601d48b91062623f2e5aa3930b4..69f702f409d8c8e4ae86cf5675ec362d1c6b0e74 100755 (executable)
                  renders)
                 ((set-renders)
                  (if (not (null? params)) (set! renders (car params))))
+                ((actions)
+                 (for-each
+                  (lambda (action)
+                    (set! attr ((cdr action) attr)))
+                  actions))
                 ((render)
-                 (for-each (lambda (render) ((cdr render) attr)) renders))))))
+                 (for-each
+                  (lambda (render)
+                    ((cdr render) attr))
+                  renders))))))
      (cond ((not (null? ',look))
            (mob 'set-renders
                 (list (cons
                        'default-look
                        (lambda-look ,attr ,@look))))))
      mob))
+
+(define (get-mob-attr mob var)
+  (let ((value (assoc-ref (mob 'get-attr) var)))
+    (if value (car value) #f)))
+
+(define (set-mob-attr! mob var value)
+  (mob 'set-attr (assoc-set! (mob 'get-attr) var (list value))))
+
+(define (add-mob-action mob name action)
+  )