Hi i’m new to Corona and Lua
In my game i have a Group with more buttons in it, when one of them is pressed the game calls a function
myGroup:addEventListener(“touch”, playerAction)
local function playerAction(event)
--stuff
end
but i want the playerAction function to do a different action depending of which of the buttons was pressed, something like:
local function playerAction(event)
– if button1 was pressed then …
– if button2 was pressed then …
– if button3 was pressed then …
end
end
Any ideas on how to do it?
