cocos2d-lua 按钮果冻效果
作者:互联网
local function generate_action(params)
local scale_action = cc.ScaleTo:create(params.time, params.scale_x, params.scale_y)
local fade_action = cc.FadeIn:create(params.time)
return cc.Spawn:create(scale_action, fade_action)
end
local spawn_action1 = generate_action({time = 0.06, scale_x = 0.63, scale_y = 1.3})
local spawn_action2 = generate_action({time = 0.12, scale_x = 1.1, scale_y = 0.7})
local spawn_action3 = generate_action({time = 0.07, scale_x = 0.8, scale_y = 1.1})
local spawn_action4 = generate_action({time = 0.07, scale_x = 1.1, scale_y = 0.95})
local spawn_action5 = generate_action({time = 0.07, scale_x = 1, scale_y = 1})
local seq_actions = cc.Sequence:create(spawn_action1, spawn_action2, spawn_action3, spawn_action4, spawn_action5)
target:runAction(seq_actions)
标签:spawn,scale,果冻,lua,cocos2d,time,action,local,generate 来源: https://blog.csdn.net/hj3601947/article/details/122494465