RPG use case (or) pattern

This commit is contained in:
2021-01-03 17:54:53 -07:00
parent 1f0ea932e8
commit 06fc186b03

View File

@@ -49,17 +49,15 @@
// Lisps don't have that either // Lisps don't have that either
(when !(and (= 0 velocity.x) (= 0 velocity.y)) (when !(and (= 0 velocity.x) (= 0 velocity.y))
(case facing (case facing
// TODO allow | in case? ((or FlxObject.LEFT FlxObject.RIGHT)
(FlxObject.LEFT
(animation.play "lr"))
(FlxObject.RIGHT
(animation.play "lr")) (animation.play "lr"))
(FlxObject.UP (FlxObject.UP
(animation.play "u")) (animation.play "u"))
(FlxObject.DOWN (FlxObject.DOWN
(animation.play "d")) (animation.play "d"))
(otherwise (otherwise
(return))))) (return))))
(return))
(defmethod &override update [:Float elapsed] (defmethod &override update [:Float elapsed]
(updateMovement) (updateMovement)