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,8 +985,12 @@
(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))
([entities whistle?]
(let [safe-song-anim (utils/make-anim-seq "safe-song/safe-song" [100 35] 0.05
(flatten
[ [
[1 2 3] [1 2 3]
(repeat 2 [ (repeat 2 [
@@ -1001,8 +1005,9 @@
[22 22 22 22 22 22 22 22 26 27 28 28 28 28 28 28 28 28 28 28 28 28 28 28] [22 22 22 22 22 22 22 22 26 27 28 28 28 28 28 28 28 28 28 28 28 28 28 28]
]))] ]))]
(when whistle?
(wait entities 200) (wait entities 200)
(begin-animation entities :ego :whistle) (begin-animation entities :ego :whistle))
(wait entities 400) (wait entities 400)
(add-entity entities :safe-song (add-entity entities :safe-song
(rooms/make-entity :safe-song (rooms/make-entity :safe-song
@@ -1020,4 +1025,5 @@
(play-sound entities "safe-sound.ogg" 0.1 false) (play-sound entities "safe-sound.ogg" 0.1 false)
(wait entities 10800) (wait entities 10800)
(remove-entity entities :safe-song) (remove-entity entities :safe-song)
(do-stop entities :ego))) (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)