Feature/state machine (#1705)

* Fix script error in old state machine example

* Add a module with a more complex state machine, that can be created and controlled through the Lua API. Useful for interactive installations

* Add an example asset for the new state machine and rename the old linear "state machine" to luastatemachine


Co-authored-by: Malin Ejdbo <malin.ejdbo@gmail.com>
This commit is contained in:
Emma Broman
2021-08-16 09:29:45 +02:00
committed by GitHub
parent afe1f960cd
commit 8d7d8b9ba4
15 changed files with 1149 additions and 39 deletions
@@ -1,3 +1,8 @@
-- Contains the required functions to create a simple Lua state machine, that can step
-- forwards and backwards through a list of states.
--
-- A state is given as a table with a Title string, and two functions: Play and Rewind
-- (see example asset)
local goToNextStateFunction = function (machine)
if (machine.currentStateIndex >= #machine.states) then