Hi,
I’ve successfully created my first few games with Corona and now I would like to clean up my code. I’ve seen that many people repeat their code (also in the latest source of Ghosts vs Monsters for example, same code written twice in the level files) across many files…but how can we outsource the logic of our levels to one central logic-file?
My screens / levels always do the same stuff so I would like to implement one “logic.lua” file where those functions are called.
The primary stuff is going on in my ontouch-method where my images are dragged…I tried outsourcing the functionality but whenever I hand over the parameters (event.target, display.contentHeight, etc…) of the event, my logic method says that it receives nil values in some parameters…
So it seems that some parameters can’t be given to external methods…?
How can I outsource mostly all of the logical functionality so that my screens only contain variable parameters for the level design?
[import]uid: 11219 topic_id: 4691 reply_id: 304691[/import]