There is something that I'm not really sure...
Could you tell me what it's better to user or what should be avoid ? If I want to create an object that I could use during some time in the application (some click activity or animation or set visibility later or remove it ), is it correct to create it as self.something ? Or it is better to create a global object in a lua page (local something) ?
Thanks
Comments
If there were a couple of lines that would require access to self.Object, that would be slightly more intensive (if you are looking for critical and optimisation) otherwise it should not matter much really.
Secondly, if you are going to encapsulate everything then fine, otherwise you would need some place to save the objects (animation, etc) which would ultimately need to be global. So you can access it by assigning it to a local variable for that function.
To back this
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
https://www.facebook.com/lesptitboutchoux
nice!
thanks!
www.tntengine.com