door opening.
This commit is contained in:
@@ -243,7 +243,9 @@
|
||||
(aget game-player-talk-sheet 0 i)))
|
||||
trophy (utils/make-anim "inside-castle/trophy.png" [16 16] 0.1 (flatten [(repeat 50 0) 1 2 3 3 3 3 2 1]))
|
||||
pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]))
|
||||
monocle (utils/make-anim "inside-castle/monocle.png" [7 7] 0.05 (flatten [(repeat 70 0) 1 2 3 3 3 2 1]))]
|
||||
monocle (utils/make-anim "inside-castle/monocle.png" [7 7] 0.05 (flatten [(repeat 70 0) 1 2 3 3 3 2 1]))
|
||||
door (utils/make-anim "inside-castle/door.png" [21 49] 0.15 (flatten [(range 4) 3 3 3 3 3 3 3]))
|
||||
]
|
||||
(rooms/make :music {:day :town-1 :night :night :sunrise :night}
|
||||
:interactions
|
||||
{:right-door {:box [286 140 306 160]
|
||||
@@ -266,11 +268,13 @@
|
||||
:cursor :up
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [182 90] :face :left)
|
||||
(sound! (sound "door.ogg") :play (utils/current-sound-volume))
|
||||
|
||||
(actions/play-animation entities :ego :reach)
|
||||
(if (= :night (get-in @entities [:state :time]))
|
||||
(actions/talk entities :ego "It's locked.")
|
||||
(do (actions/transition-background entities :inside-antique [325 -30])
|
||||
(do
|
||||
(actions/play-animation entities :door :open)
|
||||
(actions/transition-background entities :inside-antique [325 -30])
|
||||
(actions/walk-straight-to entities :ego [235 15] :face :left)
|
||||
(if (get-in @entities [:state :allowed-to-keep-teddy?])
|
||||
(actions/do-dialogue entities :shopkeep "Hello there, sonny."
|
||||
@@ -366,6 +370,12 @@
|
||||
(concat p (reverse p))))
|
||||
:bird-2 (utils/make-bird screen (as-> [[220 225] [195 235] [210 230] [250 225]] p
|
||||
(concat p (reverse p))))
|
||||
:door (assoc (animation->texture screen door)
|
||||
:x 160 :y 97 :baseline 99
|
||||
:open door
|
||||
:door-sound (sound "door.ogg")
|
||||
:anim-sound-frames {door {1 [:door-sound 1.0]}}
|
||||
)
|
||||
:sword (assoc (texture "inside-castle/sword.png")
|
||||
:x 22
|
||||
:y 110
|
||||
|
||||
Reference in New Issue
Block a user