made it so you can peel away the crack.
This commit is contained in:
BIN
desktop/resources/behindhouse/house-cover.png
Normal file
BIN
desktop/resources/behindhouse/house-cover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 13 KiB |
@@ -125,7 +125,19 @@
|
||||
(terminate [this screen entities]
|
||||
(stop screen entities target-id))
|
||||
(can-skip? [this screen entities]
|
||||
false)))
|
||||
false)))
|
||||
|
||||
(defn update-entity [entities target-id f]
|
||||
(run-action entities
|
||||
(begin [this screen entities]
|
||||
(update-in entities [:room :entities target-id] f))
|
||||
|
||||
(continue [this screen entities] entities)
|
||||
|
||||
(done? [this screen entities] true)
|
||||
|
||||
(terminate [this screen entities] entities)
|
||||
(can-skip? [this screen entities] false)))
|
||||
|
||||
(defn walk-to [entities target-id [final-x final-y] & [can-skip?]]
|
||||
(let [{start-x :x start-y :y} (get-in @entities [:room :entities target-id])
|
||||
|
||||
@@ -18,19 +18,10 @@
|
||||
(actions/transition-background entities :outside-house [244 150])
|
||||
(actions/walk-to entities :ego [195 140]))
|
||||
:cursor :left}
|
||||
:crack {:box [68 100 73 114]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
(actions/walk-to entities :ego [70 80])
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "I can see Gandarf, the wizard inside.")
|
||||
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "It looks like he's opening his Magi-safe.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "[todo: sounds play.]")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "A lot of good it'll do me to know his password while he's still there."))}
|
||||
#_:crack #_{:box [68 100 73 114]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
)}
|
||||
:mushrooms {:box [247 59 269 76]
|
||||
:script (actions/get-script
|
||||
entities
|
||||
@@ -57,6 +48,24 @@
|
||||
(actions/remove-entity entities :stick)
|
||||
(actions/give entities items/stick)
|
||||
(actions/talk entities :ego "This stick might be useful.")
|
||||
))}
|
||||
))
|
||||
:peeling (assoc (texture "behindhouse/house-cover.png")
|
||||
:x 60 :y 92 :baseline 148
|
||||
:script (actions/get-script entities
|
||||
(if (get-in @entities [:state :opened-crack?])
|
||||
(do (actions/walk-to entities :ego [70 80])
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "I can see Gandarf, the wizard inside.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "It looks like he's opening his Magi-safe.")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "[todo: sounds play.]")
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/talk entities :ego "A lot of good it'll do me to know his password while he's still there."))
|
||||
(do (actions/walk-to entities :ego [80 80])
|
||||
(actions/talk entities :ego "It looks like the wall is crumbling here.")
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(actions/update-entity entities :peeling #(assoc % :opacity 0))
|
||||
(actions/update-state entities (fn [state] (assoc state :opened-crack? true)))))))}
|
||||
:collision "behindhouse/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)))
|
||||
|
||||
Reference in New Issue
Block a user