Frame-based delays for executing arbitrary code, useful for cutscenes and complex animations.
Frame-based delays for executing arbitrary code, useful for cutscenes and complex animations.
(add-delay {:keys [current-scene] :as state} d)
Add a delay into the current scene.
Add a delay into the current scene.
(add-sprites-to-scene remaining new-sprites)
Create a delay which adds new sprites to the current scene.
Create a delay which adds new sprites to the current scene.
(add-tween-to-sprites remaining tween sprite-selection-fn)
Create a delay which adds a tween to the collection of sprites which
satisfy the sprite-selection-fn
.
Create a delay which adds a tween to the collection of sprites which satisfy the `sprite-selection-fn`.
(apply-all state ds)
Apply a sequence of delayed functions to the game state.
Apply a sequence of delayed functions to the game state.
(delay remaining f & {:keys [tag] :or {tag :none}})
Create a delay which will execute a function in a specified number of frames.
Create a delay which will execute a function in a specified number of frames.
(sequential-delays delays & {:keys [initial-delay] :or {initial-delay 0}})
Creates a sequence of delays from a given list of [time on-complete-fn] tuples where each time is relative to the ending of the previous delay.
Creates a sequence of delays from a given list of [time on-complete-fn] tuples where each time is relative to the ending of the previous delay.
(update-delay d)
Decrement :remaining
but stop at 0.
Decrement `:remaining` but stop at 0.
(update-state {:keys [current-scene] :as state})
Update all the delays in the current scene and apply the ones that have finished.
Update all the delays in the current scene and apply the ones that have finished.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close