gideros - Dispatch Touch END event until user touches the screen in Lua -


i want touches_ends event dispatched until user touches screen, how ever dispatched once when touch removed, example, want player running continuously while user not touching screen , need else when user touches screen. please?

i don't know gideros, use events store lua variable indicates touch-state. example, when touches_begin event fired, set global variable named _touching true. when touches_end event fired, set global variable false.

assuming code running in loop, have player walk when global _touching variable set false , else when variable evaluates true.

also, after little bit of googling, noticed touches_move , touches_cancel event , end event called touches_end (for sprite library), might want check on those:

hopefully on way.

edit - global variables considered bad in lua, in case, out big deal.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -