This commit is contained in:
2015-04-21 17:40:27 -07:00
parent e6bad70bfe
commit c991ce34ad
4 changed files with 19 additions and 13 deletions

View File

@@ -569,7 +569,7 @@
false))))
(defn transition-background [entities new-background [x y] & {:keys [transition-music? between time]}]
(defn transition-background [entities new-background [x y] & {:keys [transition-music? between time face]}]
(let [transition-music? (if (nil? transition-music?) true transition-music?)
old-music (get-music (get-in @entities [:room :music]) (get-in @entities [:state :time]))
new-music (get-music (get-in @entities [:rooms new-background :music]) (get-in @entities [:state :time]))
@@ -593,11 +593,13 @@
(>= (get-in entities [:fade :opacity]) 1.0))
(terminate [this screen entities]
(if-let [next-time (get-in entities [:state :next-time])]
(-> entities
(assoc-in [:state :time] next-time)
(assoc-in [:state :next-time] nil))
entities))
(stop screen (if-let [next-time (get-in entities [:state :next-time])]
(-> entities
(assoc-in [:state :time] next-time)
(assoc-in [:state :next-time] nil))
entities)
:ego
:face face))
(can-skip? [this screen entities]
false))
(run-action entities
@@ -731,3 +733,5 @@
entities)
(can-skip? [this screen entities]
false)))
(defn in-love [entities])

View File

@@ -198,10 +198,11 @@
:ego "'The Sword of Blergh with magic sting,\nShall yield to no earthly king.'"
:ego "Worthy in wisdom, courage, and might,\nOnly then with sword he'll fight. ")
(if (= 3 (count missing-items))
(actions/do-dialogue entities
:ego "I have to prove myself worthy in wisdom, courage, and might!"
:ego "Then I can become a knight and impress Georgia McGorgeous!")
(actions/in-love entities)
(do
(actions/do-dialogue entities
:ego "I have to prove myself worthy in wisdom, courage, and might!"
:ego "Then I can become a knight and impress Georgia McGorgeous!")
(actions/in-love entities))
(actions/do-dialogue entities :ego (str "I've proven myself in "
(str/join " and " (map item->proof obtained-items))
", but still have to prove myself in "

View File

@@ -112,7 +112,8 @@
:script (actions/get-script entities
(actions/update-state entities #(assoc % :wizard-left? false))
(actions/walk-to entities :ego [237 1])
(actions/transition-background entities :outside-house [262 88]))
(actions/walk-straight-to entities :ego [245 -60])
(actions/transition-background entities :outside-house [262 88] :face :left))
:cursor :down}
:safe {:box [34 70 70 115]
:script (actions/get-script entities
@@ -133,7 +134,7 @@
(assoc (texture "inside-house/desk.png") :x 0 :y 0 :baseline 200)
(assoc (texture "inside-house/sillhoute.png") :x 0 :y 0 :baseline 240 :parallax 2.0)
(assoc (texture "inside-house/glow.png") :x 0 :y 0 :baseline 199 :additive? true)]
:entities {:wizard (common/make-wizard screen {:x 228 :y 80 :baseline 160 :scale-x 1.75 :scale-y 1.75
:entities {:wizard (common/make-wizard screen {:x 228 :y 60 :baseline 160 :scale-x 1.75 :scale-y 1.75 :origin-x 0 :origin-y 0
:script (actions/get-script entities (do-wizard-dialogue entities))
:scripts #(condp = %
:kiss (actions/get-script entities

View File

@@ -321,7 +321,7 @@
:script
(actions/get-unsaved-script
entities
(actions/walk-to entities :ego [267 90])
(actions/walk-to entities :ego [257 90])
(actions/talk entities :ego (str "Anyone home?"))
(sound! (sound "door.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :reach)