seems like almost everything is working.
This commit is contained in:
@@ -23,15 +23,15 @@
|
||||
|
||||
(defn set-opacity [entities opacity tool-opacity]
|
||||
(-> entities
|
||||
(assoc-in [:room :layers 0 :opacity] opacity)
|
||||
(assoc-in [:room :layers 1 :opacity] opacity)
|
||||
(assoc-in [:room :layers 2 :opacity] opacity)
|
||||
(assoc-in [:room :layers 3 :opacity] opacity)
|
||||
(assoc-in [:room :layers 4 :opacity] opacity)
|
||||
(assoc-in [:room :layers 5 :opacity] opacity)
|
||||
(assoc-in [:room :layers 6 :opacity] opacity)
|
||||
(assoc-in [:room :layers 7 :opacity] opacity)
|
||||
(assoc-in [:room :layers 8 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 0 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 1 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 2 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 3 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 4 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 5 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 6 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 7 :opacity] opacity)
|
||||
(assoc-in [:room :current-layers 8 :opacity] opacity)
|
||||
(assoc-in [:room :entities :sword :opacity] tool-opacity)
|
||||
(assoc-in [:room :entities :case :opacity] tool-opacity)
|
||||
(assoc-in [:room :entities :broom :opacity] tool-opacity)
|
||||
@@ -47,13 +47,13 @@
|
||||
(begin [this screen entities]
|
||||
(-> entities
|
||||
(assoc-in [:tweens :fade-in]
|
||||
(tween/tween :fade-in screen [:room :layers 0 :opacity] 0.0 1.0 0.5 :ease tween/ease-in-out-quintic))))
|
||||
(tween/tween :fade-in screen [:room :current-layers 0 :opacity] 0.0 1.0 0.5 :ease tween/ease-in-out-quintic))))
|
||||
|
||||
(continue [this screen entities]
|
||||
(set-opacity entities (get-in entities [:room :layers 0 :opacity] ) 0.0))
|
||||
(set-opacity entities (get-in entities [:room :current-layers 0 :opacity] ) 0.0))
|
||||
|
||||
(done? [this screen entities]
|
||||
(= 1.0 (get-in entities [:room :layers 0 :opacity])))
|
||||
(= 1.0 (get-in entities [:room :current-layers 0 :opacity])))
|
||||
|
||||
(terminate [this screen entities]
|
||||
entities)
|
||||
@@ -410,6 +410,15 @@
|
||||
(assoc (utils/get-texture "dream/corner-l.png") :x -10 :y -10 :baseline 240 :parallax 2.0 )
|
||||
(assoc (utils/get-texture "dream/corner-r.png") :x (- 320 80) :y -20 :baseline 240 :parallax 3.2)
|
||||
(assoc (utils/get-texture "dream/pedestals.png") :x 0 :y 0 :baseline 139)]
|
||||
:current-layers [(assoc (utils/get-texture "dream/sky.png") :x 0 :y 0 :baseline -3 :parallax 0.01)
|
||||
(assoc (utils/get-texture "dream/far.png") :x -10 :y 0 :baseline -2 :parallax 0.01)
|
||||
(assoc (utils/get-texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1)
|
||||
(assoc (utils/get-texture "dream/island.png") :x 180 :y 180 :baseline 0 :parallax 0.3 :scale-x 1.1 :scale-y 1.1)
|
||||
(assoc (utils/get-texture "dream/cliff.png") :x 50 :y 133 :baseline 1 :parallax 0.6 :scale-x 1.2 :scale-y 1.2)
|
||||
(assoc (utils/get-texture "dream/background.png") :x 0 :y 0 :baseline 2)
|
||||
(assoc (utils/get-texture "dream/corner-l.png") :x -10 :y -10 :baseline 240 :parallax 2.0 )
|
||||
(assoc (utils/get-texture "dream/corner-r.png") :x (- 320 80) :y -20 :baseline 240 :parallax 3.2)
|
||||
(assoc (utils/get-texture "dream/pedestals.png") :x 0 :y 0 :baseline 139)]
|
||||
|
||||
:entities {:magic (assoc (particle-effect "particles/dream-magic") :x 160 :y 80 :baseline 240)
|
||||
|
||||
@@ -539,6 +548,7 @@
|
||||
:default {:origin-x 31}}
|
||||
:facing :left
|
||||
:update-fn (fn [s es e]
|
||||
|
||||
(assoc-in e [:offset-y] (* (:scale-y e) (get-in es [:bounce-surrogate :delta-y] 0))))
|
||||
:talk-color (Color/valueOf "ADA6FFFF")
|
||||
:script (actions/get-script entities
|
||||
|
||||
Reference in New Issue
Block a user