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)

上一篇:方法调用---springMVC中调用controller的方法


下一篇:树节点工具