0
Hy所有,我開發1個小遊戲都爲Android和iOS在科羅娜。電暈屏蔽,如何添加2個或更多的面具來顯示羣組
當用戶觸摸該組時,我需要將掩碼設置爲圖像。 這裏是我的代碼:
local function eat(event)
if event.phase == "began" the
local mask = graphics.newMask("file/mask.png")
local playSound = audio.play(biteSound)
onDishGroup:setMask(mask)
onDishGroup.maskX= event.x
onDishGroup.maskY = event.y
return true
end
的問題是,我怎麼能多面膜添加到該組? 它的工作很好,但是一次只能設置一個面具,舊的會刪除,或者只會移動到新的xy。
THX ,順便說下dosn't工作惠特我的代碼...請檢查我錯在哪裏 – Arnold
當我作爲一個數組顯示組,並在onTouch後,我將前一組添加到新的1,touche事件後第一個bakcground將死亡。 是真的,當我添加一個對象到2個更多的displaygroup將死? – Arnold