tween animation

July 4, 2022

tween animation

The tween animation integrates a series of easing methods of the UI, which can make the UI show various effects.

Multiple Tween animations with different properties can be played on the same object at the same time, which can be combined to achieve the desired effect. In addition, if the animation of the same property is played repeatedly, the initial tween animation will be overwritten by the latest tween animation. The following will illustrate some simple usage methods, see detailed tween animationsAPI documentation.

--move
self.onOpen = function()
    local image = self.Image
    UI.doTrans(image, {x = {0, 400}, y = {0, 000}}, 4)
 end

移动.gif

--rotate
self.onOpen = function()
    local image = self.Image
    UI.doRotateZ(image, 180, 2)
 end

旋转.gif

--scale
self.onOpen = function()
    local image = self.Image
    UI.doScale(image, 2, 3)
 end

缩放.gif

--Opacity
self.onOpen = function()
    local image = self.Image
    UI.doFade(image, 1,3)
 end

不透明度.gif