tweening instead of manual.
This commit is contained in:
@@ -375,16 +375,26 @@
|
||||
:pull-sword (utils/make-music "pull-sword.ogg")
|
||||
:night (utils/make-music "night.ogg")}
|
||||
:state (get-state)
|
||||
:fade (assoc (texture "black.png")
|
||||
:scale-x 20
|
||||
:scale-y 20
|
||||
:baseline 9500
|
||||
:opacity 0.0)
|
||||
|
||||
:actions {:object nil
|
||||
:channel (chan)
|
||||
:current nil
|
||||
:script-running? false
|
||||
:started? false}
|
||||
:volume {:object nil
|
||||
:value 0.0}
|
||||
:cursor {:id "cursor"
|
||||
:current :main
|
||||
:last :main
|
||||
:override nil
|
||||
:last-pos [0 0]}
|
||||
:tweens {:fade-in (utils/tween :fade-in screen [:fade :opacity] 1.0 0.0 1.5 :power 3.0)
|
||||
:fade-in-music (utils/tween :fade-in-music screen [:volume :value] 0.0 1.0 1.5 :power 3.0)}
|
||||
:all-items (assoc items/items :object nil)
|
||||
:room (as-> (get rooms (:last-room (get-state))) room
|
||||
(assoc-in room [:entities :ego] (get-ego screen (:start-pos room) ((:scale-fn room) (:start-pos room)))))
|
||||
@@ -405,7 +415,8 @@
|
||||
:on-render
|
||||
(fn [screen [entities]]
|
||||
(clear!)
|
||||
(let [entities (update-cursor screen entities)
|
||||
(let [entities (utils/apply-tweens screen entities (:tweens entities))
|
||||
entities (update-cursor screen entities)
|
||||
entities (update-from-script screen entities)
|
||||
entities (update-from-hotspots screen entities)
|
||||
entities (assoc-in entities [:room :entities :ego :last-frame] (get-in entities [:room :entities :ego :object]))
|
||||
|
||||
Reference in New Issue
Block a user