I'd like to call a stateless version of a function from a state:
This example does not work. Is something like this even possible to begin with? Or am I forced to keep using the following somewhat ugly construction:Code:// Do some stateless stuff. function DoStuff() { // Do stuff. } state TheState { // Do some extra stuff on top of the regular stuff. function DoStuff() { // First do the stateless stuff. state('').DoStuff(); // Now do the extra stuff. } }
Code:function DoStuff() { // Do the stateless stuff. DoStatelessStuff() } // Do stateless stuff. function DoStatelessStuff() { // Do stuff. } state TheState { // Do some extra stuff on top of the regular stuff. function DoStuff() { // First do the stateless stuff. DoStatelessStuff(); // Now do the extra stuff. } }



Reply With Quote


Bookmarks