ladder now breaks.
This commit is contained in:
@@ -9,13 +9,19 @@
|
||||
[play-clj.ui :refer :all]
|
||||
[play-clj.utils :refer :all]
|
||||
[play-clj.g2d :refer :all]))
|
||||
(defn get-down [entities]
|
||||
(defn get-down [entities & break]
|
||||
|
||||
(actions/walk-straight-to entities :ego [151 50] :update-baseline? false :face :left)
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/remove-entity entities :blank)
|
||||
(actions/remove-entity entities :ladder)
|
||||
(actions/give entities :ladder))
|
||||
(if break
|
||||
(do (actions/play-animation entities :ladder :destroy-ladder :stop? false)
|
||||
(actions/remove-entity entities :blank)
|
||||
(actions/remove-entity entities :ladder)
|
||||
(actions/play-animation entities :ego :sigh))
|
||||
|
||||
(do (actions/play-animation entities :ego :reach)
|
||||
(actions/remove-entity entities :blank)
|
||||
(actions/remove-entity entities :ladder)
|
||||
(actions/give entities :ladder))))
|
||||
|
||||
(defn do-saved-grandma-dialogue [entities]
|
||||
(actions/walk-to entities :ego [165 45] :face :left)
|
||||
@@ -201,7 +207,10 @@
|
||||
cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])]
|
||||
(aget cat-stand-sheet 0 i)))
|
||||
cat-walk (animation 0.2 [(texture "cat-tree/pounce.png")])
|
||||
ladder-entity (assoc (texture "inside-cafeteria/ladder.png") :x 120 :y 60 :baseline 162)
|
||||
destroy-ladder (utils/make-anim "cat-tree/destroy-ladder.png" [29 38] 0.075 (range 18))
|
||||
ladder-entity (assoc (texture "inside-cafeteria/ladder.png") :x 130 :y 60 :baseline 162
|
||||
:origin-x 0
|
||||
:destroy-ladder destroy-ladder)
|
||||
grandma-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||
grandma-squat-1 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [3 4 5 5 5 5 5])
|
||||
grandma-squat-2 (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [5 5 4 3])
|
||||
@@ -304,7 +313,7 @@
|
||||
(actions/remove-entity entities :cat)
|
||||
(actions/play-animation entities :grandma :squat-2)
|
||||
(actions/do-dialogue entities :grandma "Thank you for rescuing my furry friend, young man!")
|
||||
(get-down entities)
|
||||
(get-down entities true)
|
||||
(actions/walk-straight-to entities :ego [165 45] :face :left)
|
||||
(actions/do-dialogue entities
|
||||
:ego "It's no big deal."
|
||||
|
||||
Reference in New Issue
Block a user