-- EffectAnimation.lua

-- cache references
local effectObj = nil
local anim = nil

function OnInit()
    effectObj = Engine.GetObjectByTag("Effect")
    if effectObj then
        anim = effectObj:GetComponent("AnimationComponent")
        if anim then
            anim:Play()
        end
    end
end

function OnUpdate(dt)
    if anim and Engine.KeyDown(Keycode.Space) then

        
        anim:SetStartFrame(36)
        anim:SetEndFrame(54)
        anim:SetFrame(36)
    end
end
