mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-26 05:58:48 -05:00
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:
+5
@@ -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
|
||||
Reference in New Issue
Block a user