progress on interacting with player.
This commit is contained in:
@@ -135,15 +135,29 @@
|
|||||||
:origin-y 0
|
:origin-y 0
|
||||||
:scaled true
|
:scaled true
|
||||||
|
|
||||||
#_:mouse-in? #_(fn [entities x y]
|
:mouse-in? (fn [entities x y]
|
||||||
(let [{entity-x :x entity-y :y region :object} (get-in entities [:room :entities :ego])
|
(let [{entity-x :x entity-y :y region :object scale :scale-x} (get-in entities [:room :entities :ego])
|
||||||
width (.getRegionWidth region)
|
half-width (/ (* (.getRegionWidth region) (or scale 1.0)) 2)
|
||||||
height (.getRegionHeight region)]
|
height (* (.getRegionHeight region) (or scale 1.0))]
|
||||||
|
#_(clojure.pprint/pprint [["point" x y]
|
||||||
|
["entity " (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)]])
|
||||||
|
|
||||||
((zone/box entity-x entity-y (+ entity-x width) (+ entity-y height)) x y)))
|
((zone/box (- entity-x half-width) entity-y (+ entity-x half-width) (+ entity-y height)) x y)))
|
||||||
#_:get-script #_(fn [cursor [x y]]
|
:get-script (fn [cursor [x y]]
|
||||||
(case cursor
|
(condp = cursor
|
||||||
items/flask-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "Yuck. I filled it with backwash."))))
|
items/flask-1-with-cream-of-mushroom (actions/get-script entities (actions/talk entities :ego "My muscles have doubled in size!"))
|
||||||
|
items/recipe (actions/get-script entities (actions/do-dialogue entities
|
||||||
|
:ego "The recipe says:"
|
||||||
|
:ego "'For strength beyond measure,'"
|
||||||
|
:ego "'you must mix, at your leisure,'"
|
||||||
|
:ego "'1. Cream of mushroom soup.'"
|
||||||
|
:ego "'2. Saliva of the creature whose strength you want to match.'"
|
||||||
|
:ego "'3. Heat over flame.'"
|
||||||
|
:ego "'A word of warning, before you go.'"
|
||||||
|
:ego "'A sip is all it takes to grow.'"
|
||||||
|
:ego "'Not more than that do drink,'"
|
||||||
|
:ego "'Or you'll push your body to the brink.'"))
|
||||||
|
nil))
|
||||||
:x 150 :y 95
|
:x 150 :y 95
|
||||||
:id "ego"}]
|
:id "ego"}]
|
||||||
(actions/start-animation screen
|
(actions/start-animation screen
|
||||||
@@ -205,7 +219,7 @@
|
|||||||
:inside-fangald (make-music "inside-fangald.ogg")}
|
:inside-fangald (make-music "inside-fangald.ogg")}
|
||||||
:state {:object nil
|
:state {:object nil
|
||||||
:active? true
|
:active? true
|
||||||
:inventory []
|
:inventory [items/flask-1-with-cream-of-mushroom items/recipe]
|
||||||
:clues #{}
|
:clues #{}
|
||||||
:mints-eaten 0}
|
:mints-eaten 0}
|
||||||
:actions {:object nil
|
:actions {:object nil
|
||||||
|
|||||||
Reference in New Issue
Block a user