0
私はここに画像作成
gangster = display.newImageRect("assets/gangsta.png", gangsterwidth, gangsterheight)
gangster.x = display.contentCenterX
gangster.y = 950
sceneGroup:insert(gangster)
をそして、私はそれをここで設定した後、私は今、画像を拡大縮小したい:
local function enterFrameListener()
if holding then
if (touchx < gangster.x) then
gangster.x = gangster.x - 10
end
if (touchx > gangster.x) then
gangster.x = gangster.x + 10
end
if (touchy > gangster.y) then
gangster.y = gangster.y + 10
-- INCREASE HEIGHT AND WIDTHHERE
end
if (touchy < gangster.y) then
gangster.y = gangster.y - 10
gangsterheight = gangsterheight -5
-- DECREASE HEIGHT AND WIDTH HERE
end
if (touchx == gangster.x) then
if (touchy == gangster.y) then
Runtime:removeEventListener("enterFrame", enterFrameListener)
holding = false
end
end
else
end
end
しかし、どのように私はこれをするのですか?
Omg私はいつも鍛造しています。 。ありがとうございました! – AlGrande