类型 函数 库 transition.* 返回值 对象 修订版 2024.3703 版 关键字 缓动、动画、过渡、补间、内插
在两个显示对象之间执行溶解过渡。
transition.dissolve( object1, object2, time, delay )
DisplayObject. 初始显示对象。
DisplayObject. 最终显示对象。
Number. 以毫秒为单位指定过渡持续时间。默认情况下,持续时间为 500 毫秒。
Number. 以毫秒为单位指定过渡开始前的延迟时间。默认值为 0
。
-- Create the initial display object local s1 = display.newImage( "sun.png" ) s1.x, s1.y = 200,300 -- Create the final display object and set its alpha to 0 local s2 = display.newImage( "moon.png" ) s2.x, s2.y = 200,300 s2.alpha = 0 -- Dissolve the two images transition.dissolve( s1, s2, 2000, 500 )