Module: PseudoGame.game.Timeline

Custom timeline class (it can be used with the game object, but it's disabled by default as it doesn't support increments)

Functions

PseudoGame.game.Timeline:new (on_empty_function) constructor for a new timeline
PseudoGame.game.Timeline:overwrite () overwrite the default t_ functions with this timeline
PseudoGame.game.Timeline:restore () restore the t_ functions that were present before overwriting
PseudoGame.game.Timeline:on_empty_function () function that is called when the timeline is empty (defined using the parameter in the constructor)
PseudoGame.game.Timeline:update (frametime) update the timeline
PseudoGame.game.Timeline:wait_until (time) append to the timeline: wait
PseudoGame.game.Timeline:wait (time) append to the timeline: wait
PseudoGame.game.Timeline:eval (func) append to the timeline: eval
PseudoGame.game.Timeline:clear () remove all entries from the timeline


Functions

🔗 PseudoGame.game.Timeline:new (on_empty_function)
constructor for a new timeline

Parameters:

Name Type(s) Description
on_empty_function function function that is called once the timeline is empty (should append new things to the timeline) (basically the same as onStep)

Returns:

    Timeline
🔗 PseudoGame.game.Timeline:overwrite ()
overwrite the default t_ functions with this timeline
🔗 PseudoGame.game.Timeline:restore ()
restore the t_ functions that were present before overwriting
🔗 PseudoGame.game.Timeline:on_empty_function ()
function that is called when the timeline is empty (defined using the parameter in the constructor)
🔗 PseudoGame.game.Timeline:update (frametime)
update the timeline

Parameters:

Name Type(s) Description
frametime number time in 1/60s that passed since the last call of this function
🔗 PseudoGame.game.Timeline:wait_until (time)
append to the timeline: wait

Parameters:

Name Type(s) Description
time number time in 1/60s to wait until (starts counting from where Timeline:update is called for the first time)
🔗 PseudoGame.game.Timeline:wait (time)
append to the timeline: wait

Parameters:

Name Type(s) Description
time number time in 1/60s to wait
🔗 PseudoGame.game.Timeline:eval (func)
append to the timeline: eval

Parameters:

Name Type(s) Description
func function the function to execute once this is reached
🔗 PseudoGame.game.Timeline:clear ()
remove all entries from the timeline
generated by LDoc 1.5.0