seems like almost everything is working.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@@ -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
|
||||
|
||||
@@ -88,14 +88,12 @@
|
||||
(cond (= [4 2 1 5 3] (:button-choices new-state))
|
||||
(do ((:success entities) (-> @(resolve 'advent.screens.scene/scene)
|
||||
:entities
|
||||
deref
|
||||
first))
|
||||
deref))
|
||||
(close entities))
|
||||
(= 5 (count (:button-choices new-state)))
|
||||
(do ((:failure entities) (-> @(resolve 'advent.screens.scene/scene)
|
||||
:entities
|
||||
deref
|
||||
first))
|
||||
deref))
|
||||
(close entities))
|
||||
:else
|
||||
new-state)))
|
||||
|
||||
@@ -1063,7 +1063,7 @@ void main ()
|
||||
(merge (-> entities :time-profiles night-profile))
|
||||
(assoc :time (-> entities :state :time)))
|
||||
e)
|
||||
(if offset-y
|
||||
#_(if offset-y
|
||||
(assoc e :y (+ y offset-y))
|
||||
e)))
|
||||
|
||||
@@ -1318,7 +1318,7 @@ void main ()
|
||||
e)
|
||||
|
||||
e (if update-fn
|
||||
(update-fn screen entities e)
|
||||
(update-fn screen (get-in entities [:room :entities]) e)
|
||||
e)
|
||||
e (get-rendered entities e)]
|
||||
e))
|
||||
|
||||
@@ -481,33 +481,33 @@
|
||||
|
||||
(#{:back } actor-key)
|
||||
(-> entities
|
||||
(dissoc :save-menu)
|
||||
(dissoc :chapters-menu)
|
||||
(dissoc :settings-menu)
|
||||
(utils/remove-actor-from-stage :save-menu)
|
||||
(utils/remove-actor-from-stage :chapters-menu)
|
||||
(utils/remove-actor-from-stage :settings-menu)
|
||||
(assoc :main-menu (->> (main-menu screen)
|
||||
(utils/add-actor-to-stage screen))))
|
||||
|
||||
(#{:dont-delete-button } actor-key)
|
||||
(as-> entities entities
|
||||
(dissoc entities :confirm-delete)
|
||||
(assoc entities :save-menu (->> (saves-menu entities (:renderer screen))
|
||||
(utils/add-actor-to-stage screen))))
|
||||
(utils/remove-actor-from-stage entities :confirm-delete)
|
||||
(assoc entities :save-menu (->> (saves-menu entities (:renderer screen))
|
||||
(utils/add-actor-to-stage screen))))
|
||||
|
||||
(= :load actor-key)
|
||||
(as-> entities entities
|
||||
(dissoc entities :main-menu)
|
||||
(utils/remove-actor-from-stage entities :main-menu)
|
||||
(assoc entities :save-menu (->> (saves-menu entities (:renderer screen))
|
||||
(utils/add-actor-to-stage screen))))
|
||||
|
||||
(= :chapters actor-key)
|
||||
(-> entities
|
||||
(dissoc :main-menu)
|
||||
(utils/remove-actor-from-stage :main-menu)
|
||||
(assoc :chapters-menu (->> (chapters-menu )
|
||||
(utils/add-actor-to-stage screen))))
|
||||
|
||||
(= :settings actor-key)
|
||||
(-> entities
|
||||
(dissoc :main-menu)
|
||||
(utils/remove-actor-from-stage :main-menu)
|
||||
(assoc :settings-menu (->> (settings-menu)
|
||||
(utils/add-actor-to-stage screen))))
|
||||
|
||||
@@ -529,7 +529,7 @@
|
||||
|
||||
(= :delete actor-key)
|
||||
(as-> entities entities
|
||||
(dissoc entities :save-menu)
|
||||
(utils/remove-actor-from-stage entities :save-menu)
|
||||
(assoc entities :confirm-delete (->> (confirm-delete entities)
|
||||
(utils/add-actor-to-stage screen))))
|
||||
|
||||
@@ -537,10 +537,10 @@
|
||||
(do
|
||||
(utils/remove-save (:id (:selected-save entities)))
|
||||
(as-> entities entities
|
||||
(dissoc entities :confirm-delete)
|
||||
(assoc entities :saves-list (utils/snapshot-screenshots))
|
||||
(assoc entities :save-menu (->> (saves-menu entities (:renderer screen))
|
||||
(utils/add-actor-to-stage screen)))))
|
||||
(utils/remove-actor-from-stage entities :confirm-delete)
|
||||
(assoc entities :saves-list (utils/snapshot-screenshots))
|
||||
(assoc entities :save-menu (->> (saves-menu entities (:renderer screen))
|
||||
(utils/add-actor-to-stage screen)))))
|
||||
|
||||
(:save e)
|
||||
(do
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
|
||||
(defn remove-actor-from-stage
|
||||
([entities id]
|
||||
(remove-actor-from-stage (id entities)))
|
||||
(do
|
||||
(remove-actor-from-stage (id entities))
|
||||
(dissoc entities id)))
|
||||
([{:keys [^Actor object]}]
|
||||
(when object
|
||||
(.remove object))))
|
||||
|
||||
Reference in New Issue
Block a user