small refinements.

This commit is contained in:
Bryce Covert
2015-07-30 17:43:18 -07:00
parent f6f046bbb9
commit 5217685c15
4 changed files with 5 additions and 4 deletions

View File

@@ -7,3 +7,4 @@
+ closing should stop all scripts
+ dialogue for coin drop
+ night gandarf text is bad
+ descriptions for all items when used on self.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -193,13 +193,14 @@
(actions/walk-to entities :ego [245 90]))
(defn flip-coin [screen entities]
(if (not (get-in entities [:state :has-dropped-coin?]))
(if (and (= 0 (rand-int 2))
(not (get-in entities [:state :has-dropped-coin?])))
(-> entities
(update-in [:room :entities :coin-flip] (fn [cf] (-> (actions/start-animation screen cf :coinflip)
(assoc :opacity 1.0))))
(assoc-in [:tweens :coin-y] (tween/tween :coin-y screen [:room :entities :coin-flip :y] 112 175 0.5 :ease tween/ease-out-cubic
:finish (fn [e]
(assoc-in e [:tweens :coin-y] (tween/tween :coin-y (assoc screen :total-time (+ 0.5 (:total-time screen))) [:room :entities :coin-flip :y] 174 116 0.5 :ease tween/ease-in-cubic
(assoc-in e [:tweens :coin-y] (tween/tween :coin-y (assoc screen :total-time (+ 0.5 (:total-time screen))) [:room :entities :coin-flip :y] 174 118 0.5 :ease tween/ease-in-cubic
:finish (fn [e]
(assoc-in e [:room :entities :coin-flip :opacity] 0.0)))))))
(update-in [:room :entities :goon-2] (fn [g] (-> (actions/start-animation screen g :flip)))))
@@ -211,7 +212,7 @@
walkie-visible (animation 1.0 [(last (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))])
walkie-invisible (animation 1.0 [(first (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))])]
(rooms/make :music {:day :town-2 :night :night}
:timers {:taunt [4.0 11.0 flip-coin]}
:timers {:taunt [1.0 6.0 flip-coin]}
:interactions {:right-dir {:box [300 40 320 83]
:script (actions/get-script entities
(actions/walk-to entities :ego [301 46] :face :right)

View File

@@ -750,7 +750,6 @@ void main()
:on-timer
(fn [screen [entities]]
(when-let [timer-fn (get-in entities [:room :timers (:id screen) 2])]
(println "here")
(timer-fn screen entities)))
:on-show