So I have a menu buttons that directly use functions to change the game state ie. restart, reset, zoom etc. These functions are also used as eventListener functions for touch events. But because they are used for two seperate purpose I am being forced to play follow the leader with rearranging all these different functions and objects. Is there is way to make the functions all simultaneous available like in other languages?
Also if I make these functions table listeners like:
[lua]function box:touch( event ) print(“hello”); end;
box:addEventListener(“touch”, box)[/lua]
Is it possible to access these functions from another function:
[lua]local function MagicallyAccessOtherfunction()
box:touch({randomEventinfo=""})
end[/lua] [import]uid: 54716 topic_id: 10567 reply_id: 310567[/import]