better fire animation (and sound)

This commit is contained in:
2014-12-14 19:45:31 -08:00
parent a1a887f347
commit f406ae412f
8 changed files with 5 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -156,6 +156,7 @@
(actions/talk entities :ego "All of these trinkets seem too bulky to fit in my pack."))}
:flowers {:box [171 125 181 155]
:script (actions/get-script entities
(actions/update-state entities (fn [s] (assoc s :mints-eaten 0)))
(actions/talk entities :ego "I've never been a fan of flowers."))}
:lian {:box [272 100 313 160]
:script (actions/get-script entities
@@ -196,6 +197,7 @@
(actions/talk entities :ego "I'll just try one of these mints.")
(actions/play-animation entities :ego :reach)
(actions/update-state entities (fn [s] (assoc s :mints-eaten (inc (s :mints-eaten)))))
(sound! (sound (str "inside-antique/fire-" (get-in @entities [:state :mints-eaten]) ".ogg")) :play)
(actions/play-animation entities :ego [:fire (get-in @entities [:state :mints-eaten])])
(actions/talk entities :ego "WOWZA! Those are hot.")
(when (= 3 (get-in @entities [:state :mints-eaten]))

View File

@@ -115,11 +115,11 @@
(texture (aget cat-toy-sheet 0 i))))
cat-toy-last-half (animation 0.1 (for [i [3 3 3 2 1 1 0 0]]
(texture (aget cat-toy-sheet 0 i))))
fire-1-anim (animation 0.1 (for [i [0 1 2 2 2 3 2 3 2 2 2 1 0]]
fire-1-anim (animation 0.1 (for [i [0 1 2 2 2 3 2 3 2 2 2 2 2 2 2 2 2 2 1 0]]
(texture (aget fire-sheet 0 i))))
fire-2-anim (animation 0.1 (for [i [0 1 2 2 2 2 3 2 3 2 2 2 4 5 6 7 2 2 2 2 2 2 2 2 1 0]]
fire-2-anim (animation 0.1 (for [i [0 1 2 2 2 3 2 3 2 2 2 2 2 2 2 4 4 4 5 6 7 4 4 4 2 2 2 2 2 2 2 2 1 0]]
(texture (aget fire-sheet 0 i))))
fire-3-anim (animation 0.1 (for [i [0 1 2 2 2 2 3 2 3 2 2 2 4 5 6 7 2 2 2 8 9 10 11 2 2 2 2 2 2 2 2 0]]
fire-3-anim (animation 0.1 (for [i [0 1 2 2 2 3 2 3 2 2 2 2 2 2 4 4 4 4 4 4 5 6 7 4 4 4 4 4 8 9 10 11 4 4 4 2 2 2 2 2 2 2 2 0]]
(texture (aget fire-sheet 0 i))))
grow (animation 0.1 (for [i [0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 3 0 0 0 0 3 0 0 0 3 3 0 0 0 2 2 0 0 2 0 0 2 0 2 0 2 0 2 0 2 0 2 3 2 3 2 3 2 3 2 4 3 4 3 4 3 4]]
(texture (aget grow-sheet 0 i))))