much better love.
This commit is contained in:
@@ -788,14 +788,7 @@
|
||||
:none)))
|
||||
|
||||
|
||||
(defn in-love [entities]
|
||||
(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))))
|
||||
|
||||
|
||||
|
||||
(defn fade-in-georgia [entities]
|
||||
@@ -848,14 +841,34 @@
|
||||
(fade-out-georgia entities)
|
||||
(transition-music entities nil :duration 1.0))
|
||||
|
||||
(defn wait-for-animation [entities target anim]
|
||||
(actions/run-action entities
|
||||
(begin [this screen entities]
|
||||
entities)
|
||||
|
||||
(continue [this screen entities]
|
||||
entities)
|
||||
|
||||
(done? [this screen entities]
|
||||
(animation! (actions/find-animation (get-in entities [:room :entities target]) anim)
|
||||
:is-animation-finished
|
||||
(- (:total-time screen) (get-in entities [:room :entities target :anim-start]))))
|
||||
|
||||
(terminate [this screen entities]
|
||||
entities)
|
||||
(skip-type [this screen entities]
|
||||
:none)))
|
||||
|
||||
(defn in-love [entities]
|
||||
(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)
|
||||
(begin-animation entities :georgia-face :love)
|
||||
(fade-in-georgia entities)
|
||||
(play-animation entities :ego :love)
|
||||
(actions/update-state entities (fn [s] (assoc s :has-seen-love? true)))
|
||||
(update-state entities (fn [s] (assoc s :has-seen-love? true)))
|
||||
(wait-for-animation entities :georgia-face :love)
|
||||
(fade-out-georgia entities)
|
||||
(do-stop entities :georgia-face)
|
||||
(transition-music entities nil :duration 1.0))))
|
||||
|
||||
Reference in New Issue
Block a user