first stateful interaction.

This commit is contained in:
=
2014-09-15 20:31:30 -07:00
parent 01c5c91f66
commit c5cbb7387e
2 changed files with 23 additions and 1 deletions

View File

@@ -101,6 +101,7 @@
:origin-x 9
:origin-y 0
:scaled true
:inventory #{}
:x 150 :y 95
:id "ego"}]
(merge (texture (animation! (:right ego) :get-key-frame 0.25)) ego)))
@@ -223,7 +224,10 @@
(actions/talk entities :ego (str "Aww, it's a cute little sheep.")))
:touch
(actions/get-script
(actions/talk entities :ego "I guess his wool is shedding."))
(if ((get-in entities [:ego :inventory]) :wool)
(actions/talk entities :ego "The sheep has given me enough wool.")
(do (actions/give entities :ego :wool)
(actions/talk entities :ego "I guess his wool is shedding."))))
nil)))]
:scale-fn (scaler-fn-with-baseline 110 0.10 1.00)
:layers [(assoc background :x 0 :y 0 :baseline 0)