klik=1
local odejmij = Button.new(Bitmap.new(Texture.new("class/2.png")),
Bitmap.new(Texture.new("class/5.png")))
odejmij:setPosition(250, 200)
self:addChild(odejmij)
odejmij:addEventListener("click",
function()
click=klik
klik=klik+1
print(klik)
end
)
local animb = Button.new(Bitmap.new(Texture.new("class/1.png")),
Bitmap.new(Texture.new("class/1.png")))
animb:setPosition(50, 200)
self:addChild(animb)
animb:addEventListener("click",
function()
print(klik)
end
)
when i click odejmij button and then next animb value of klik shouldnt be for example 3 (if i click 3 times on odejmij and then on animb)?
Comments
then it should be click count on odejmij + 1