I’m new to Lua and the Corona SDK. Currently I am working my way through the book Corona SDK Mobile GameDevelopment and Programming in Lua (mainly just using this book as a reference). Now I am starting to realize that event-driven programs can be written, but I am wondering how to structure such a program. Can anybody provide me with a link to an example?
Let’s say that I have created a couple of screen objects that have event listeners looking to see if the objects are touched and I want to call a function depending upon which object is touched. Is there some sort of simple do nothing program loop that would execute until an event occurs? Is there an instruction to halt the program and wait for an event? As you can tell, I’m clueless on how to structure a simple event-driven program. Any links to examples or a beginner tutorial would be helpful.