Hi guys
How would I go about making reusable code snippets that I can run within scene manager levels to add things that are going to be repeated throughout?
Normally I would create functions and just run them, but since I'm using scene manager I have to use self:addChild … instead of stage:addChild …
When I try to put self:addChild inside a global function or a required lua file, I get an error, as there is no "self" to add the graphics to.
Hopefully this makes sense?
Thank you for any help
Comments
I am not sure i understand what you're trying to achieve vut you could start by passing your scene as an argument.
Thank you heaps for your help!
I'm still getting my head around how things work in Gideros.
You're welcome.
I have no doubt that you will find Gideros flexible and powerful.
Good luck with your projects