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))))
|
||||
|
||||
@@ -427,7 +427,8 @@
|
||||
(actions/do-dialogue entities
|
||||
:ego "That's Georgia McGorgeous' house."
|
||||
:ego "One day, when I'm a knight, she'll say...")
|
||||
(actions/georgia-say entities "Kiss me, brave Sir Tick!"))}}
|
||||
#_(actions/georgia-say entities "Kiss me, brave Sir Tick!")
|
||||
(actions/in-love entities))}}
|
||||
:layers {:day [(assoc (utils/get-texture "inside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97)
|
||||
(assoc (utils/get-texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)
|
||||
|
||||
@@ -929,12 +929,14 @@ void main()
|
||||
(defn add-georgia-to-all-rooms [screen rooms]
|
||||
(let [georgia-talk (utils/make-anim "ego/georgia.png" [30 30] 0.2 [0 1 0 1 0 0 1 0 1 2])
|
||||
georgia-stand (utils/make-anim "ego/georgia.png" [30 30] 0.3 [0 0 0 0 0 0 0 2 0 0 0 0 2])
|
||||
georgia-love (utils/make-anim "ego/in-love.png" [30 30] 0.1 [0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 16 17 18 17 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 4 5 6 7 8 9 10 11 12 13 14 14 14 15 15 15 14 14 14 14 14 14 14 14 15 15 15 15 15 14 14 14 14 15 15 15 15 15 15 14 14 14 14 14])
|
||||
|
||||
georgia-face (rooms/make-entity :georgia-face
|
||||
(assoc (animation->texture screen georgia-stand)
|
||||
:talk georgia-talk
|
||||
:anim georgia-stand
|
||||
:stand georgia-stand
|
||||
:love georgia-love
|
||||
:talk-color (Color/valueOf "ffabe0ff")
|
||||
:anim-start 0
|
||||
:x 100 :y 100 :baseline 242 :origin-x 15 :origin-y 15
|
||||
|
||||
Reference in New Issue
Block a user