EffectFruitLight.lua
474 Bytes
local EffectFruitLight = class("EffectFruitLight",function (spriteFrameName)
return cc.Sprite:createWithSpriteFrameName(spriteFrameName)
end);
function EffectFruitLight:ctor(spriteFrameName)
end
function EffectFruitLight:flash()
local fadeIn = cc.FadeIn:create(0.3);
local fadeOut = cc.FadeOut:create(0.3);
local repeatAction = cc.RepeatForever:create(cc.Sequence:create(fadeIn,fadeOut));
self:runAction(repeatAction);
end
return EffectFruitLight