diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-27 11:09:50 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-27 11:09:50 -0500 |
commit | 641d084e27f8178bd43784c292f4b6b482e64739 (patch) | |
tree | 8511a91022349a28a8639158b334c3d3c4699921 /examples/02-moving-bitmp.lisp | |
parent | 9c058339dde198062e96674c515ea946de5902b5 (diff) |
[modify] renamed set-handler to add-handler
Diffstat (limited to 'examples/02-moving-bitmp.lisp')
-rw-r--r-- | examples/02-moving-bitmp.lisp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/02-moving-bitmp.lisp b/examples/02-moving-bitmp.lisp index 318bed4..53a4f35 100644 --- a/examples/02-moving-bitmp.lisp +++ b/examples/02-moving-bitmp.lisp @@ -47,14 +47,14 @@ (:scancode-up (setf dy 1 desty (+ ty (ww::unit-height target)))) (:scancode-left (setf dx -1 destx (- tx (ww::unit-width target)))) (:scancode-right (setf dx 1 destx (+ tx (ww::unit-width target))))) - (ww::set-handler + (ww::add-handler target (ww::on-perframe () (with-slots ((cx ww::x) (cy ww::y)) target (if (and (= cx destx) (= cy desty)) (progn (remhash target *shared-anim-table*) - (ww::unset-handler target 'ww::perframe)) + (ww::remove-handler target 'ww::perframe)) (setf cx (+ cx dx) cy (+ cy dy))))))))))) @@ -91,22 +91,22 @@ (make-instance 'ww::bitmap :texture (ww::get-asset "RootBear.png")))) - (ww::set-handler app #'wheelie) + (ww::add-handler app #'wheelie) ;; first (ww::refocus-on bm) - (ww::set-handler bm #'animate-move-thing ) - (ww::set-handler bm #'thing-clicked) - (ww::set-handler bm #'mouse-over) + (ww::add-handler bm #'animate-move-thing ) + (ww::add-handler bm #'thing-clicked) + (ww::add-handler bm #'mouse-over) (ww::add-unit app bm) ;;second (setf (ww::unit-x bm2) 90 (ww::unit-y bm2) 90) - (ww::set-handler bm2 #'move-thing) - (ww::set-handler bm2 #'flip-on-click ) - (ww::set-handler bm2 #'look-at-me) - (ww::set-handler bm2 #'look-away) - (ww::set-handler bm2 #'wheelie) + (ww::add-handler bm2 #'move-thing) + (ww::add-handler bm2 #'flip-on-click ) + (ww::add-handler bm2 #'look-at-me) + (ww::add-handler bm2 #'look-away) + (ww::add-handler bm2 #'wheelie) (ww::add-unit app bm2))) |