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
|
:script (actions/get-script entities
|
||||||
(walk-to-frankie entities)
|
(walk-to-frankie entities)
|
||||||
(actions/talk entities :ego "Listen, Frankie...")
|
(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]
|
(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])]
|
(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]
|
(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)]))
|
(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}
|
(rooms/make :music {:day :town-2 :night :night}
|
||||||
:interactions {:right-dir {:box [300 40 320 83]
|
:interactions {:right-dir {:box [300 40 320 83]
|
||||||
:script (actions/get-script entities
|
:script (actions/get-script entities
|
||||||
@@ -138,20 +142,16 @@
|
|||||||
:scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}}
|
:scripts {:walkie-talkies (actions/get-script entities (drop-walkie-talkie entities))}}
|
||||||
:window {:box [192 157 215 215]
|
:window {:box [192 157 215 215]
|
||||||
:script (actions/get-script entities
|
:script (actions/get-script entities
|
||||||
(actions/walk-to entities :ego [285 71])
|
(actions/talk entities :ego "That's a big window!"))
|
||||||
(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]))
|
|
||||||
:scripts {:walkie-talkies (actions/get-script entities
|
:scripts {:walkie-talkies (actions/get-script entities
|
||||||
(actions/walk-to entities :ego [285 71])
|
(actions/walk-to entities :ego [285 71])
|
||||||
(actions/walk-straight-to entities :ego [308 105] :face :left)
|
(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/play-animation entities :ego :throw)
|
||||||
(actions/remove-item entities :walkie-talkies)
|
(actions/remove-item entities :walkie-talkies)
|
||||||
(actions/begin-animation entities :throw-walkie :stand)
|
(actions/begin-animation entities :walkie-talkies :stand)
|
||||||
(Thread/sleep 2000)
|
(Thread/sleep 2000)
|
||||||
(actions/walk-straight-to entities :ego [285 71]))}}}
|
(actions/walk-straight-to entities :ego [285 71]))}}}
|
||||||
|
|
||||||
@@ -160,14 +160,17 @@
|
|||||||
:entities {:frankie (make-frankie screen)
|
:entities {:frankie (make-frankie screen)
|
||||||
:goon-1 (make-goon-1 screen)
|
:goon-1 (make-goon-1 screen)
|
||||||
:goon-2 (make-goon-2 screen)
|
:goon-2 (make-goon-2 screen)
|
||||||
:throw-walkie (assoc (animation->texture screen walkie-base)
|
}
|
||||||
:x 104 :y 88
|
:walkie-talkies (rooms/make-entity :walkie-talkies
|
||||||
:baseline 130
|
(assoc (animation->texture screen walkie-visible)
|
||||||
|
:x 104 :y 88
|
||||||
:throw-walkie throw-walkie
|
:baseline 130
|
||||||
:stand walkie-base
|
:night-profile :sprite
|
||||||
:anim-start 0
|
:throw-walkie throw-walkie
|
||||||
:anim walkie-base)}
|
:stand walkie-visible
|
||||||
|
:walkie-invisible walkie-invisible
|
||||||
|
:anim-start 0
|
||||||
|
:anim walkie-visible))
|
||||||
|
|
||||||
:collision "castle-gate/collision.png"
|
:collision "castle-gate/collision.png"
|
||||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.30)
|
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.30)
|
||||||
@@ -175,5 +178,10 @@
|
|||||||
(as-> entities entities
|
(as-> entities entities
|
||||||
(if (= :night (get-in entities [:state :time]))
|
(if (= :night (get-in entities [:state :time]))
|
||||||
(make-night entities)
|
(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)))
|
entities)))
|
||||||
:start-pos [300 45])))
|
:start-pos [300 45])))
|
||||||
|
|||||||
@@ -374,6 +374,7 @@
|
|||||||
:x 257
|
:x 257
|
||||||
:y 135
|
:y 135
|
||||||
:baseline 0
|
:baseline 0
|
||||||
|
:night-profile :sprite
|
||||||
:script (actions/get-script entities
|
:script (actions/get-script entities
|
||||||
(actions/talk entities :ego "Let's give it a listen.")
|
(actions/talk entities :ego "Let's give it a listen.")
|
||||||
(actions/walk-to entities :ego [272 136] :face :left)
|
(actions/walk-to entities :ego [272 136] :face :left)
|
||||||
|
|||||||
Reference in New Issue
Block a user