对象:resume()

类型 函数
返回值
修订 版本 2024.3703
关键词 动画, 补间动画, 插值, 恢复
另请参阅 对象:pause()
animation.pause()
animation.resume()
补间动画
animation.*

概述

恢复已暂停的补间动画对象。

语法

object:resume()

示例

local object1 = display.newRect( 50, 50, 100, 100 )

-- Move the object
local newTween = animation.to( object1, { x=150, y=400 }, { time=5000 } )

-- After 2 seconds, pause the tween
timer.performWithDelay( 2000, function() newTween:pause(); end )

-- Sometime later, resume the tween
newTween:resume()