This commit is contained in:
Bryce Covert
2016-06-15 18:06:43 -07:00
parent 23fda8c5bc
commit 023874885f
2 changed files with 44 additions and 38 deletions

View File

@@ -985,39 +985,45 @@
(skip-type [this screen entities] (skip-type [this screen entities]
:none)))) :none))))
(defn play-safe [entities] (defn play-safe
(let [safe-song-anim (utils/make-anim-seq "safe-song/safe-song" [100 35] 0.05 (flatten ([entities]
[ (play-safe entities true))
[1 2 3] ([entities whistle?]
(repeat 2 [ (let [safe-song-anim (utils/make-anim-seq "safe-song/safe-song" [100 35] 0.05
[5 6 7 8 8 7 6 6 6 6 6] (flatten
(map (partial + 4) [5 6 7 8 8 7 6 6 6 6 6]) [
(map (partial + 8) [5 6 7 8 8 7 6 6 6 6 6]) [1 2 3]
(map (partial + 12) [5 6 7 8 8 7 6 6 6 6 6]) (repeat 2 [
18 18 18 18 [5 6 7 8 8 7 6 6 6 6 6]
(map (partial + 16) [5 6 7 8 8 7 6 6 6 6 6]) (map (partial + 4) [5 6 7 8 8 7 6 6 6 6 6])
(repeat 45 22)]) (map (partial + 8) [5 6 7 8 8 7 6 6 6 6 6])
(map (partial + 12) [5 6 7 8 8 7 6 6 6 6 6])
[22 22 22 22 22 22 22 22 26 27 28 28 28 28 28 28 28 28 28 28 28 28 28 28] 18 18 18 18
(map (partial + 16) [5 6 7 8 8 7 6 6 6 6 6])
]))] (repeat 45 22)])
(wait entities 200)
(begin-animation entities :ego :whistle) [22 22 22 22 22 22 22 22 26 27 28 28 28 28 28 28 28 28 28 28 28 28 28 28]
(wait entities 400)
(add-entity entities :safe-song ]))]
(rooms/make-entity :safe-song (when whistle?
(assoc (utils/get-texture "safe-song/safe-song-1") (wait entities 200)
:x 130 (begin-animation entities :ego :whistle))
:y 120 (wait entities 400)
:baseline 241 (add-entity entities :safe-song
:night-profile :none (rooms/make-entity :safe-song
:anim nil (assoc (utils/get-texture "safe-song/safe-song-1")
:anim-start 0 :x 130
:play safe-song-anim))) :y 120
:baseline 241
(begin-animation entities :safe-song :play) :night-profile :none
(wait entities 100) :anim nil
(play-sound entities "safe-sound.ogg" 0.1 false) :anim-start 0
(wait entities 10800) :play safe-song-anim)))
(remove-entity entities :safe-song)
(do-stop entities :ego))) (begin-animation entities :safe-song :play)
(wait entities 100)
(play-sound entities "safe-sound.ogg" 0.1 false)
(wait entities 10800)
(remove-entity entities :safe-song)
(when whistle?
(do-stop entities :ego)))))

View File

@@ -92,7 +92,7 @@
(actions/play-animation entities :ego :start-squat :stop? false) (actions/play-animation entities :ego :start-squat :stop? false)
(actions/talk entities :ego "I can see Gandarf the wizard inside." :animate? false :stop? false) (actions/talk entities :ego "I can see Gandarf the wizard inside." :animate? false :stop? false)
(actions/talk entities :ego "It looks like he's opening his Magi-safe." :animate? false :stop? false) (actions/talk entities :ego "It looks like he's opening his Magi-safe." :animate? false :stop? false)
(actions/play-sound entities "safe-sound.ogg" 0.1) (actions/play-safe entities false)
(actions/talk entities :ego "So that's the code to his safe..." :animate? false :stop? false) (actions/talk entities :ego "So that's the code to his safe..." :animate? false :stop? false)
(actions/play-animation entities :ego :end-squat) (actions/play-animation entities :ego :end-squat)
(actions/talk entities :ego "A lot of good it'll do me to know his password while he's still there.") (actions/talk entities :ego "A lot of good it'll do me to know his password while he's still there.")
@@ -106,7 +106,7 @@
(actions/talk entities :ego "I'll give it another listen.") (actions/talk entities :ego "I'll give it another listen.")
(actions/play-animation entities :ego :start-squat :stop? false) (actions/play-animation entities :ego :start-squat :stop? false)
(actions/talk entities :ego "It looks like Gandarf's opening his Magi-safe." :animate? false :stop? false) (actions/talk entities :ego "It looks like Gandarf's opening his Magi-safe." :animate? false :stop? false)
(actions/play-sound entities "safe-sound.ogg" 0.1) (actions/play-safe entities false)
(actions/play-animation entities :ego :end-squat) (actions/play-animation entities :ego :end-squat)
(actions/talk entities :ego "Ugh! Now I've got it stuck in my head!") (actions/talk entities :ego "Ugh! Now I've got it stuck in my head!")
(increment-safe-listens entities) (increment-safe-listens entities)