RPG use case (or) pattern
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user