I have this image:

local core = display.newImage("images/core.png", (display.contentWidth/2), display.contentHeight/5)

And when something happened i do this:

spinCore()

Calling this function:

local function spinCore()
    transition.to(core,{time=500,rotation=360})
end

This is working, but only the first time i do this, by the next ones it isn´t working. I hope you can help me. Thank you!

有帮助吗?

解决方案

Just do like:

local function spinCore()
    transition.to(core,{time=500,rotation=core.rotation+360})
end

Keep coding.................. :)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top