minor improvements.

This commit is contained in:
Bryce Covert
2015-08-05 08:30:42 -07:00
parent 3ccd78544e
commit ff8149fabb
8 changed files with 27 additions and 7 deletions

View File

@@ -764,6 +764,10 @@
(defn in-love [entities]
(transition-music entities :love :duration 1.0)
(play-animation entities :ego :love)
(transition-music entities nil :duration 1.0))
(let [seen-love (get-in @entities [:state :has-seen-love?])]
(when (or (not seen-love)
(< (rand-int 10) 3))
(transition-music entities :love :duration 1.0)
(play-animation entities :ego :love)
(actions/update-state entities (fn [s] (assoc s :has-seen-love? true)))
(transition-music entities nil :duration 1.0))))