This demo sort of skims the surface of how you could use Stateless.
In this example I am using it to move through modes of a small animation user interface which I could see was going to massive platter of logic spaghetti.
The basic concept works as follows:
Set you states (in this example I use enums but you could just as easily use strings, number and even objects) and set your triggers, which, again, could be anything.
Finally in the processes that the states are used for, ‘Fire’ the trigger to transition to the next state.
Its a pretty good system, but it is a little easy to break. You may have to restart vvvv because it may hold on to the last state even while you’re having an error. I’ll look into it when I have a little more time.
Also, I have it setup to trigger on startup, but I like to think and hope that it can be edited in runtime.
Zip below or check out the Git
Stateless - UI example.zip (349.4 KB)