progress on throwing.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 9.3 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
{:sound-volume 44.0, :music-volume 39.0}
|
||||
{:sound-volume 0.0, :music-volume 0.0}
|
||||
@@ -88,7 +88,10 @@
|
||||
:script (actions/get-script entities
|
||||
(walk-to-frankie entities)
|
||||
(actions/talk entities :ego "Listen, Frankie...")
|
||||
(present-frankie-choices entities)))))
|
||||
(present-frankie-choices entities))
|
||||
|
||||
:scripts {:walkie-talkies (actions/get-script entities
|
||||
(actions/do-dialogue entities :frankie "Tin cans? What do I need walkie talkies for?"))})))
|
||||
|
||||
(defn make-goon-1 [screen]
|
||||
(let [stand (utils/make-anim "castle-gate/goon-1.png" [12 33] 0.21 [0 0 0 0 0 0 0 0 0 1])]
|
||||
@@ -121,7 +124,8 @@
|
||||
|
||||
(defn make [screen]
|
||||
(let [throw-walkie (utils/make-anim "castle-gate/throw-walkie.png" [205 136] 0.1 (flatten [(repeat 55 0) (range 9) (repeat 55 8)]))
|
||||
walkie-base (animation 1.0 [(last (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))])]
|
||||
walkie-visible (animation 1.0 [(last (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))])
|
||||
walkie-invisible (animation 1.0 [(first (utils/split-texture "castle-gate/throw-walkie.png" [205 136] (range 9)))])]
|
||||
(rooms/make :music {:day :town-2 :night :night}
|
||||
:interactions {:right-dir {:box [300 40 320 83]
|
||||
:script (actions/get-script entities
|
||||
@@ -138,20 +142,16 @@
|
||||
:scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}}
|
||||
:window {:box [192 157 215 215]
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [285 71])
|
||||
(actions/walk-straight-to entities :ego [308 105] :face :left)
|
||||
(actions/begin-animation entities :throw-walkie :throw-walkie)
|
||||
(actions/play-animation entities :ego :throw)
|
||||
(actions/begin-animation entities :throw-walkie :stand)
|
||||
(Thread/sleep 2000)
|
||||
(actions/walk-straight-to entities :ego [285 71]))
|
||||
(actions/talk entities :ego "That's a big window!"))
|
||||
:scripts {:walkie-talkies (actions/get-script entities
|
||||
(actions/walk-to entities :ego [285 71])
|
||||
(actions/walk-straight-to entities :ego [308 105] :face :left)
|
||||
(actions/begin-animation entities :throw-walkie :throw-walkie)
|
||||
(actions/add-entity entities :walkie-talkies (actions/start-animation (get-in @entities [:room :walkie-talkies])
|
||||
:walkie-invisible))
|
||||
(actions/begin-animation entities :walkie-talkies :throw-walkie)
|
||||
(actions/play-animation entities :ego :throw)
|
||||
(actions/remove-item entities :walkie-talkies)
|
||||
(actions/begin-animation entities :throw-walkie :stand)
|
||||
(actions/begin-animation entities :walkie-talkies :stand)
|
||||
(Thread/sleep 2000)
|
||||
(actions/walk-straight-to entities :ego [285 71]))}}}
|
||||
|
||||
@@ -160,14 +160,17 @@
|
||||
:entities {:frankie (make-frankie screen)
|
||||
:goon-1 (make-goon-1 screen)
|
||||
:goon-2 (make-goon-2 screen)
|
||||
:throw-walkie (assoc (animation->texture screen walkie-base)
|
||||
:x 104 :y 88
|
||||
:baseline 130
|
||||
|
||||
:throw-walkie throw-walkie
|
||||
:stand walkie-base
|
||||
:anim-start 0
|
||||
:anim walkie-base)}
|
||||
}
|
||||
:walkie-talkies (rooms/make-entity :walkie-talkies
|
||||
(assoc (animation->texture screen walkie-visible)
|
||||
:x 104 :y 88
|
||||
:baseline 130
|
||||
:night-profile :sprite
|
||||
:throw-walkie throw-walkie
|
||||
:stand walkie-visible
|
||||
:walkie-invisible walkie-invisible
|
||||
:anim-start 0
|
||||
:anim walkie-visible))
|
||||
|
||||
:collision "castle-gate/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.30)
|
||||
@@ -175,5 +178,10 @@
|
||||
(as-> entities entities
|
||||
(if (= :night (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)
|
||||
(if (and (not (actions/has-item? entities :walkie-talkies))
|
||||
(actions/has-obtained? entities :walkie-talkies))
|
||||
(assoc-in entities [:room :entities :walkie-talkies]
|
||||
(get-in entities [:room :walkie-talkies]))
|
||||
entities)))
|
||||
:start-pos [300 45])))
|
||||
|
||||
@@ -374,6 +374,7 @@
|
||||
:x 257
|
||||
:y 135
|
||||
:baseline 0
|
||||
:night-profile :sprite
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ego "Let's give it a listen.")
|
||||
(actions/walk-to entities :ego [272 136] :face :left)
|
||||
|
||||
Reference in New Issue
Block a user