Just wondering, which of these functions would be better or more efficient
this:
[code]-- function with two “ifs”
function event ()
if event.phase == “began” then
if event.target.myId == “button1” then
– do something
end
if event.target.myId == “button2” then
– do something
end
end
end[/code]
or this:
[code]-- function with an “if” and an “elseif”
function event ()
if event.phase == “began” then
if event.target.myId == “button1” then
– do something
elseif event.target.myId == “button2” then
– do something
end
end
end[/code] [import]uid: 116264 topic_id: 25517 reply_id: 325517[/import]