working on held.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
desktop/resources/ego/suspended.png
Normal file
BIN
desktop/resources/ego/suspended.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
desktop/resources/ego/suspended.pxa/0.pxi
Normal file
BIN
desktop/resources/ego/suspended.pxa/0.pxi
Normal file
Binary file not shown.
10
desktop/resources/ego/suspended.pxa/CelData.plist
Normal file
10
desktop/resources/ego/suspended.pxa/CelData.plist
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>duration</key>
|
||||
<real>1</real>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
||||
BIN
desktop/resources/held/background.png
Normal file
BIN
desktop/resources/held/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
desktop/resources/held/background.psd
Normal file
BIN
desktop/resources/held/background.psd
Normal file
Binary file not shown.
BIN
desktop/resources/held/collision.png
Normal file
BIN
desktop/resources/held/collision.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -640,7 +640,7 @@
|
||||
new-music (get-music (get-in entities [:room :music]) (get-in entities [:state :time]))
|
||||
apply-state (get-in entities [:room :apply-state])
|
||||
entities (if apply-state
|
||||
(apply-state entities)
|
||||
(apply-state screen entities)
|
||||
entities)
|
||||
entities (utils/update-override screen entities)]
|
||||
(when (and (not= new-music old-music) transition-music?)
|
||||
|
||||
1025
desktop/src-common/advent/screens/#scene.clj#
Normal file
1025
desktop/src-common/advent/screens/#scene.clj#
Normal file
File diff suppressed because it is too large
Load Diff
1
desktop/src-common/advent/screens/.#scene.clj
Symbolic link
1
desktop/src-common/advent/screens/.#scene.clj
Symbolic link
@@ -0,0 +1 @@
|
||||
bryce@bryce-pc.hsd1.wa.comcast.net.5560
|
||||
@@ -88,7 +88,7 @@
|
||||
:bird (utils/make-bird screen [[50 235] [80 220] [100 239] [180 235] [85 225]])}
|
||||
:collision "behindhouse/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (get-in entities [:state :opened-crack?])
|
||||
(assoc-in entities [:room :entities :peeling :opacity] 0)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
:collision "castle-gate/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.30)
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (= :night (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
nil)))
|
||||
:collision "cat-tree/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-item? entities :kiss)
|
||||
(update-in entities [:room :entities] #(dissoc % :cat))
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
(actions/play-animation entities :ego :sigh))})}
|
||||
:collision "dream/collision.png"
|
||||
:scale-fn (utils/scaler-fn-from-image "dream/scale.png" 0.1 1.3)
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (get-in entities [:state :seen-intro?])
|
||||
(set-opacity entities 1.0 1.0)
|
||||
|
||||
29
desktop/src-common/advent/screens/rooms/held.clj
Normal file
29
desktop/src-common/advent/screens/rooms/held.clj
Normal file
@@ -0,0 +1,29 @@
|
||||
(ns advent.screens.rooms.held
|
||||
(:require [advent.screens.rooms :as rooms]
|
||||
[advent.screens.rooms.common :as common]
|
||||
[advent.actions :as actions]
|
||||
[advent.screens.items :as items]
|
||||
[advent.utils :as utils]
|
||||
[advent.tween :as tween]
|
||||
[clojure.zip :as zip]
|
||||
[clojure.set :as set]
|
||||
[clojure.string :as str]
|
||||
[play-clj.core :refer :all]
|
||||
[play-clj.ui :refer :all]
|
||||
[play-clj.utils :refer :all]
|
||||
[play-clj.math :refer :all]
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn make [screen]
|
||||
(rooms/make :music :fight
|
||||
:interactions {}
|
||||
:layers [(assoc (texture "held/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:entities {}
|
||||
:collision "held/collision.png"
|
||||
:scale-fn (constantly 1.5)
|
||||
:start-pos [113 120]
|
||||
:apply-state (fn [screen e]
|
||||
(-> e
|
||||
(assoc-in [:cam :paused? ] true)
|
||||
(update-in [:tweens] dissoc :cam-x :cam-y)
|
||||
(update-in [:room :entities :ego] #(actions/start-animation screen % :suspended))))))
|
||||
@@ -220,7 +220,7 @@
|
||||
(actions/talk entities :shopkeep "Since you ate the last one, you have to go tell Gandarf to bring me some more."))))))
|
||||
:teddy teddy}
|
||||
:collision "inside-antique/collision.png"
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (or (actions/has-item? entities :teddy)
|
||||
(actions/has-obtained? entities :balloon))
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
:win hands-fight-win
|
||||
:lose hands-fight-lose)
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.3)
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-item? entities :ladder)
|
||||
(update-in entities [:room :entities] #(dissoc % :ladder))
|
||||
|
||||
@@ -475,7 +475,7 @@
|
||||
:chorus {:sound (sound "inside-castle/chorus.wav")}
|
||||
:collision "inside-castle/collision.png"
|
||||
:scale-fn (utils/scaler-fn-from-image "inside-castle/scale.png" 0.25 1.00)
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-obtained? entities :trophy)
|
||||
(update-in entities [:room :entities] #(dissoc % :trophy))
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
:baseline 225))
|
||||
:collision "inside-house/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.75)
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(particle-effect! (get-in entities [:room :entities :candle-smoke] ) :reset)
|
||||
(particle-effect! (get-in entities [:room :entities :candle-smoke] ) :start)
|
||||
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
:collision-free (advent.pathfind/map-from-resource "inside-jail/collision-free.png")
|
||||
:scale-fn (utils/scaler-fn-with-baseline 0 0.50 1.5)
|
||||
:start-pos [130 85]
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (actions/has-obtained? entities :ball-n-chain)
|
||||
(update-in entities [:room :entities] #(dissoc % :ball-n-chain))
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
:collision "inside-stash/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00)
|
||||
:start-pos [143 96]
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(if (get-in entities [:state :broke-lock?])
|
||||
(update-in entities [:room :entities] #(dissoc % :lid))
|
||||
entities))))
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
:collision "outside-castle/collision.png"
|
||||
:scale-fn (utils/scaler-fn-from-image "outside-castle/scale-map.png" 0.20 1.00)
|
||||
:start-pos [310 80]
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(if (#{:night :sunrise} (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
entities)))))
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
(common/read-note-1 entities))))
|
||||
:collision "outsidehouse/collision.png"
|
||||
:scale-fn scaler
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (get-in entities [:state :coaxed-sheep?])
|
||||
(let [scale ((get-in entities [:room :scale-fn]) [90 138])]
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
:collision "outside-jail/collision.png"
|
||||
:scale-fn (utils/scaler-fn-with-baseline 40 0.001 1.3)
|
||||
:start-pos [145 15]
|
||||
:apply-state (fn [entities]
|
||||
:apply-state (fn [_ entities]
|
||||
(as-> entities entities
|
||||
(if (= :night (get-in entities [:state :time]))
|
||||
(make-night entities)
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
{}
|
||||
:layers [(assoc (texture "space/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:timers {:taunt [10.0 8.0 taunt]
|
||||
:shock [5.0 1.0 shock]}
|
||||
:shock [5.0 15.0 shock]}
|
||||
:entities {:appear (assoc effect
|
||||
:x 240 :y 50
|
||||
:baseline 200)
|
||||
@@ -262,7 +262,9 @@
|
||||
(Thread/sleep 5000)
|
||||
(actions/do-dialogue entities
|
||||
:bloodclot-head "Argh! My lightning gem!"
|
||||
:bloodclot-head "No matter. I will rip you apart with my bare hands!"))})}
|
||||
:bloodclot-head "No matter. I will rip you apart with my bare hands!")
|
||||
(actions/pause-camera entities)
|
||||
(actions/transition-background entities :held [125 170]))})}
|
||||
:bullet (assoc (animation->texture screen bullet)
|
||||
:x 37 :y 85 :baseline 241
|
||||
:walk bullet)
|
||||
@@ -271,7 +273,7 @@
|
||||
:collision "space/collision.png"
|
||||
:scale-fn (constantly 1.5)
|
||||
:start-pos [35 45]
|
||||
:apply-state (fn [e]
|
||||
:apply-state (fn [_ e]
|
||||
(as-> e e
|
||||
(if (get-in e [:state :broke-jewel?])
|
||||
(assoc-in e [:room :entities :broken-jewel] (get-in e [:room :entities :broken-jewel]))
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
[advent.screens.rooms.behind-house :as rooms.behind-house]
|
||||
[advent.screens.rooms.outside-castle :as rooms.outside-castle]
|
||||
[advent.screens.rooms.space :as rooms.space]
|
||||
[advent.screens.rooms.held :as rooms.held]
|
||||
[advent.screens.rooms.cat-tree :as rooms.cat-tree]
|
||||
[advent.screens.dialogue :refer [talking-screen]]
|
||||
[advent.screens.inventory :refer [inventory-screen]]
|
||||
@@ -362,6 +363,7 @@ void main()
|
||||
love (utils/make-anim "ego/love.png" [50 70] 0.1 (flatten [0 0 1 1 2 2 3 3 4 4 5 5 6 6 (repeat 10 7) (repeat 5 8) (repeat 5 7) (repeat 5 8) (repeat 5 7) (repeat 10 [23 24 25 24]) (repeat 30 9) 10 11 12 13 14 15 16 17 18 19 20 21 21 21 22 22 22 21 21 21 21 21 21 21 21 22 22 22 22 22 21 21 21 21 22 22 22 22 22 22 21 21 21 21 21 6 6 5 5 4 4 3 3 2 2 1 1 0]))
|
||||
axe (utils/make-anim "ego/axe.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 7)]))
|
||||
axe-wood (utils/make-anim "ego/axe-wood.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 11)]))
|
||||
suspended (utils/make-anim "ego/suspended.png" [18 36] 0.10 [0])
|
||||
|
||||
ego {:right {:walk walk-right
|
||||
:stand stand-anim
|
||||
@@ -406,6 +408,7 @@ void main()
|
||||
:idea idea
|
||||
:axe axe
|
||||
:axe-wood axe-wood
|
||||
:suspended suspended
|
||||
}
|
||||
:left {:walk (utils/flip walk-right)
|
||||
:stand (utils/flip stand-anim)
|
||||
@@ -440,7 +443,8 @@ void main()
|
||||
:love (utils/flip love)
|
||||
:idea (utils/flip idea)
|
||||
:axe (utils/flip axe)
|
||||
:axe-wood (utils/flip axe-wood)}
|
||||
:axe-wood (utils/flip axe-wood)
|
||||
:suspended (utils/flip suspended)}
|
||||
:baseline (- 240 (last start-pos))
|
||||
:facing :right
|
||||
:night-profile :sprite
|
||||
@@ -531,6 +535,8 @@ void main()
|
||||
(get-in ego [:right :axe]) {:origin-x 17}
|
||||
(get-in ego [:right :axe-wood]) {:origin-x 17}
|
||||
(get-in ego [:left :love]) {:origin-x 36}
|
||||
(get-in ego [:left :suspended]) {:origin-x 0 :origin-y 0}
|
||||
(get-in ego [:right :suspended]) {:origin-x 0 :origin-y 0}
|
||||
:default {:origin-x 9}})]
|
||||
(actions/start-animation screen
|
||||
(merge (animation->texture screen (:stand (:right ego))) ego)
|
||||
@@ -734,6 +740,7 @@ void main()
|
||||
:cat-tree (rooms.cat-tree/make screen)
|
||||
:inside-castle (rooms.inside-castle/make screen)
|
||||
:space (rooms.space/make screen)
|
||||
:held (rooms.held/make screen)
|
||||
:inside-cafeteria (rooms.inside-cafeteria/make screen)
|
||||
:inside-antique (rooms.inside-antique/make screen)
|
||||
:inside-jail (rooms.inside-jail/make screen)
|
||||
@@ -799,7 +806,7 @@ void main()
|
||||
|
||||
|
||||
(if-let [apply-state (get-in entities [:room :apply-state])]
|
||||
(apply-state entities)
|
||||
(apply-state screen entities)
|
||||
entities)))))
|
||||
|
||||
:on-resume (fn [screen [entities]]
|
||||
|
||||
Reference in New Issue
Block a user