added concept of different background musics.

This commit is contained in:
2014-11-03 22:51:08 -08:00
parent 0390c2bfa5
commit 57a84f5101
8 changed files with 30 additions and 10 deletions

View File

@@ -10,7 +10,8 @@
[play-clj.g2d :refer :all]))
(defn make [screen]
(rooms/make :interactions
(rooms/make :music :town-2
:interactions
{:left-dir {:box [0 131 20 224]
:script (actions/get-script
entities

View File

@@ -12,7 +12,8 @@
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])]
(aget cat-stand-sheet 0 i)))]
(rooms/make :interactions
(rooms/make :music :town-2
:interactions
{:down-dir {:box [150 0 270 20]
:script (actions/get-script entities
(actions/walk-to entities :ego [203 1])

View File

@@ -92,7 +92,8 @@
(let [game-player-talk-sheet (texture! (texture "inside-castle/game-player-talk.png") :split 40 44)
game-player-talk (animation 0.15 (for [i [0 2 0 2 0 2 0 3 0 2 0 1 0 0 0 0 2 0 2 0 3 0 1 0 1 0 0 1 0 2 0 3 0]]
(aget game-player-talk-sheet 0 i)))]
(rooms/make :interactions
(rooms/make :music :town-1
:interactions
{:right-door {:box [286 140 306 160]
:cursor :right
:script (actions/get-script entities

View File

@@ -15,7 +15,8 @@
(aget wizard-sheet 0 i)))
wizard-talk (animation 0.2 (for [i [0 2 0 2 1 2 0 3 0 2 0 1 0 2]]
(aget wizard-sheet 0 i)))]
(rooms/make :interactions {:down-dir {:box [151 0 320 20]
(rooms/make :music :inside-fangald
:interactions {:down-dir {:box [151 0 320 20]
:script (actions/get-script entities
(actions/walk-to entities :ego [237 1])
(actions/transition-background entities :outside-house [262 88]))

View File

@@ -15,7 +15,8 @@
(aget peddler-sheet 0 i)))
peddler-stand (animation 0.2 (for [i (flatten [(repeat 5 0) 6])]
(aget peddler-sheet 0 i)))]
(rooms/make :interactions
(rooms/make :music :town-2
:interactions
{:right-dir {:box [300 40 320 140]
:script (actions/get-script
entities

View File

@@ -118,7 +118,8 @@
(aget sheep-stand-sheet 0 i)))
sheep-walk (animation 0.05 (for [i (range 6)]
(aget sheep-walk-sheet 0 i)))]
(rooms/make :interactions
(rooms/make :music :town-2
:interactions
{:door {:box [258 100 281 160]
:script (actions/get-script
entities