more tweaks.

This commit is contained in:
2015-04-21 18:31:40 -07:00
parent 7b6d0f7a88
commit 694da55a0d
4 changed files with 24 additions and 13 deletions

View File

@@ -161,6 +161,17 @@
(defn stop [screen entities target-id & {:keys [face]}]
(update-in entities [:room :entities target-id] (comp #(start-animation screen % :stand) (if face #(assoc % :facing face) identity))))
(defn do-stop [entities target-id & {:keys [face]}]
(run-action entities
(begin [this screen entities]
(update-in entities [:room :entities target-id]
(comp #(start-animation screen % :stand) (if face #(assoc % :facing face) identity))))
(continue [this screen entities] entities)
(done? [this screen entities] true)
(terminate [this screen entities]
entities)
(can-skip? [this screen entities]
false)))
@@ -320,8 +331,8 @@
(terminate [this screen entities]
(stop screen entities target-id :face face))
(can-skip? [this screen entities]
(or can-skip? false)))
@entities)))
(or can-skip? false)))
(do-stop entities :ego :face face))))
(defn get-text-duration [text]
(* (count (s/split text #" ")) 0.5))
@@ -452,6 +463,8 @@
(can-skip? [this screen entities]
false)))
(defn update-state [entities f]
(update-entities entities #(update-in % [:state] f)))

View File

@@ -113,7 +113,7 @@
(actions/update-state entities #(assoc % :wizard-left? false))
(actions/walk-to entities :ego [237 1])
(actions/walk-straight-to entities :ego [245 -60])
(actions/transition-background entities :outside-house [262 88] :face :left))
(actions/transition-background entities :outside-house [257 90] :face :left))
:cursor :down}
:safe {:box [34 70 70 115]
:script (actions/get-script entities

View File

@@ -142,7 +142,7 @@
:wizard "... a ..."
:wizard "... a frog!"
:ego "Okay, okay! I'm leaving.")
(actions/transition-background entities :outside-house [262 88])
(actions/transition-background entities :outside-house [257 90])
(actions/do-dialogue entities :ego "I guess he's really upset with me."
:ego "I wonder if I can convince him to let me stay..."))}
"You're still cross about my stealing your magic cowboy hat?"
@@ -153,7 +153,7 @@
:wizard "And you little pipsqueak stole it from me!"
:wizard "That's why I bought my Magi-Safe 5000, to keep out intruders like you."
:wizard "Now leave, before I get really angry!.")
(actions/transition-background entities :outside-house [262 88])
(actions/transition-background entities :outside-house [257 90])
(actions/do-dialogue entities :ego "I guess he's really upset with me."
:ego "I wonder if I can convince him to let me stay..."))}
"Even an old hoot like you needs a kick in the pants every now and again."
@@ -165,14 +165,14 @@
:wizard "When you have a bod like man, you can hardly go to the grocery store without being noticed."
:wizard "But no. Your looks, however good they may be, don't give you the right to teach me a lesson."
:wizard "Now please leave me in peace.")
(actions/transition-background entities :outside-house [262 88])
(actions/transition-background entities :outside-house [257 90])
(actions/talk entities :ego "Gandarf is pretty upset, but I bet he can be reasoned with."))}
"My good standing within the community?"
{:run #(do (actions/respond entities %
:wizard "Ha! Good standing?"
:wizard "You're the neighborhood cheat and everyone knows it."
:wizard "Now please leave me in peace.")
(actions/transition-background entities :outside-house [262 88])
(actions/transition-background entities :outside-house [257 90])
(actions/talk entities :ego "Gandarf is pretty upset, but I bet he can be reasoned with."))}
"I'm going to be a knight! That counts for something doesn't it?"
{:run #(do (actions/respond entities %
@@ -209,7 +209,7 @@
{:run #(do (actions/respond entities %
:wizard "While your goal sounds noble, no amount of bizarre conversation tree searching will earn my respect."
:wizard "Now please leave.")
(actions/transition-background entities :outside-house [262 88])
(actions/transition-background entities :outside-house [257 90])
(actions/talk entities :ego "If only Gandarf could be tricked into seeing the valiant side of me..."))}]}]}]}
"You're not happy to see me, Gandarf?"
{:run #(actions/respond entities % :wizard "Of course not, you little brat. You've made my life a living hell!")
@@ -217,7 +217,7 @@
"Goodbye, Gandarf!"
{:run #(do
(actions/respond entities % :wizard "Now scram!")
(actions/transition-background entities :outside-house [262 88]))}]}))
(actions/transition-background entities :outside-house [257 90]))}]}))
(defn talk-to-gandarf-outside [entities]
@@ -321,7 +321,7 @@
:script
(actions/get-unsaved-script
entities
(actions/walk-to entities :ego [257 90])
(actions/walk-to entities :ego [257 90] :face :right)
(actions/talk entities :ego (str "Anyone home?"))
(sound! (sound "door.ogg") :play (utils/current-sound-volume))
(actions/play-animation entities :ego :reach)

View File

@@ -159,10 +159,8 @@
:script (actions/get-script entities (try-to-go-in-stash entities))}}
:layers {:day [(assoc (texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)]
:night [(assoc (texture "outside-jail/background-dark.png") :x 0 :y 0 :baseline 0)]}
:entities {:fountain (assoc (texture "outside-jail/dot.png") #_(animation->texture screen fountain)
:entities {:fountain (assoc (animation->texture screen fountain)
:x 150 :y 126 :baseline 114
#_:anim fountain
#_:anim-start 0
:script (actions/get-script entities
(actions/walk-to entities :ego [151 119] :face :right)
(actions/play-animation entities :ego :reach)