hi,
i would have a distinction between the touch on my background and the touch on my character’s.
the behaviour of my snippet is that i have no distinction between the background and the Character’s. if i touch my character, the background also is touched.
how do you do for that ?
thanks for your’s advice.
function Backgroundinvisible:touch(event) if event.phase == "ended" and clicback then --my action1 end end Backgroundinvisible:addEventListener( "touch", Backgroundinvisible ) local function characterTap(event) target = event.target for k=1,#Character do if target.myId == (k) and clic then --my action2 end end end for i = 1, #Character do Character[i]:addEventListener("tap", characterTap) end
