--// Local auxiliary functions - - - - - - - - - - - - - - - - - - - - - - - -

--// 1.	rename:					" -> '
--// 2. comment root compositions routine: "createCompositionBG_01 = function()"
--// 2.1. remove dynamite sprite from exploding composition (with texture "dinamit_pl.png")
--// 3. add auxiliaru routines for managing animations: 
--		auxPlayOutroAnimation(), 
--		auxGetOutroAnimation(), 
--		auxCreateOutroAnimations()
--// 4. replace CreateCompositionElement() with auxCreateCompositionElement() for some corrections ...

------------------------------------------------------------------------------
--
function auxPlayOutroAnimation(compositionName)
    local composition = auxGetOutroAnimation(compositionName);
    composition:SetVisible(true);
    composition:Play();
end

------------------------------------------------------------------------------
--
function auxHideOutroAnimation(compositionName)
    local composition = auxGetOutroAnimation(compositionName);
    composition:Stop();
    composition:SetVisible(false);
end

------------------------------------------------------------------------------
--
function auxGetOutroAnimation(compositionName)
    assert(outroCompositions ~= nil and compositionName ~= nil);
	assert(outroCompositions[compositionName] ~= nil and 'Composition with specified name not exists !');

    return outroCompositions[compositionName];
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--

function CreateComposition(parent, compositionRoutine, name, x,y,z, hotSpotX,hotSpotY, duration, isCyclic)
    assert(parent ~= nil and compositionRoutine ~= nil and name ~= nil and z ~= nil and duration ~= nil);

    local element = compositionRoutine();
    element:SetName(name);
    element:SetHotSpot(hotSpotX,hotSpotY);
    element:SetXY(x, y);
    assert(z - parent:GetZ());
    element:SetZ(z - parent:GetZ());
    element:AttachTo(parent);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);
    
    if (isCyclic == true) then
        element:SetDuration(duration);
        element:SetCyclic(true);
	else
		element:SetDestroysOnEnd(false);
    end
	element:Stop();
    element:SetVisible(false);
    element:AssignClippingRect(parent);
	element:SetConsiderParentOpacity(true);

	return element;
end

-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function auxCreateCompositionElement2(resourceName)
	local element = CreateCompositionElement(resourceName);
    local texName = string.sub(resourceName, string.len('data/Texture/Scenes/26_Outro/Animations/') + 1);

    --// set up dino animation
	if (texName == 'SarahHome/dinoRun_[0000-0009].png') then
		local anim = element:GetTexture();
		anim:Stop();
		anim:SetTextureRect(0,0, 177,64);
		anim:SetFrames(10);
		anim:SetFrame(0);
		anim:SetSpeed(30.0);
		anim:SetMode(HGEANIM_FWD + HGEANIM_LOOP);
		anim:Play();
    end
	--// set up saegulls animation
	if (texName == 'SarahHome/sg_[0000-0009].png') then
		local anim = element:GetTexture();
		anim:Stop();
		anim:SetTextureRect(0,0, 40,22);
		anim:SetFrames(10);
		anim:SetFrame(0);
		anim:SetSpeed(30.0);
		anim:SetMode(HGEANIM_FWD + HGEANIM_LOOP);
		anim:Play();
    end

    --// set additive alpha blending mode for light & flare objects without alpha chanel (*.jpg)
    if (texName == 'SarahHome/EF_blik01.jpg' or
		texName == 'SarahHome/EF_Caustic_01.jpg' or
		texName == 'SarahHome/EF_light4_01.jpg') then

        element:GetTexture():SetBlendMode(0);
    end
	return element;
end

------------------------------------------------------------------------------
--
function auxCreateOutroAnimations(parent)
    assert(parent ~= nil);

    outroCompositions = {};
    local CreateAndRegisterComposition = function (parent, compositionRoutine, name, x,y,z, hotSpotX,hotSpotY, duration, isCyclic)
        local element = CreateComposition(parent, compositionRoutine, name, x,y,z, hotSpotX,hotSpotY, duration, isCyclic);
        outroCompositions[element:GetName()] = element;
    end

	--// 
    CreateAndRegisterComposition(parent, createCompositionTop,		'Top',		0,0,208, 512,384, 10, true);
    CreateAndRegisterComposition(parent, createCompositionDino,		'Dino',		0,0,207, 512,384, 10, false);
    CreateAndRegisterComposition(parent, createCompositionSeagull1,	'Seagull1',	0,0,207, 512,384, 10, false);
    CreateAndRegisterComposition(parent, createCompositionSeagull2,	'Seagull2',	0,0,206, 512,384, 10, false);
    CreateAndRegisterComposition(parent, createCompositionSeagull3,	'Seagull3',	0,0,206, 512,384, 10, false);
    CreateAndRegisterComposition(parent, createCompositionSea,		'Sea',		0,0,202, 512,384, 10, true);
    CreateAndRegisterComposition(parent, createCompositionPool,		'Pool',		0,0,202, 512,384, 10, true);
end

------------------------------------------------------------------------------
-- mechanism zoom
--createCompositionBG_01 = function()
--
--    local compositionBG_01 = CreateCompositionSequence();
--    local compositionDuration = 10;
--    compositionBG_01:SetDuration(compositionDuration);
--
--
--    -- Layer Layer_1
--    local element = createCompositionTop();
--    element:SetName('Layer_1');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--
--    -- Layer Layer_2
--    local element = createCompositionDino();
--    element:SetName('Layer_2');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--
--    -- Layer Layer_3
--    local element = createCompositionSeagull1();
--    element:SetName('Layer_3');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--
--    -- Layer Layer_4
--    local element = createCompositionSeagull2();
--    element:SetName('Layer_4');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--
--    -- Layer Layer_5
--    local element = createCompositionSeagull3();
--    element:SetName('Layer_5');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--
--    -- Layer Layer_6
--    local element = createCompositionSea();
--    element:SetName('Layer_6');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--
--    -- Layer Layer_7
--    local element = createCompositionPool();
--    element:SetName('Layer_7');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--
--    -- Layer Layer_8
--    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/BG_01.jpg');
--    element:SetName('Layer_8');
--    compositionBG_01:AddElement(element);
--    element:SetHotSpot(512, 384);
--    element:SetParentElement(compositionBG_01);
--    element:SetXY(512, 384);
--
--    element:SetScaleX(1);
--    element:SetScaleY(1);
--    element:SetAngle(0);
--    element:SetOpacity(1);
--
--    effector = element:GetEffector();
--    effector:SetLifeTime(0, 10);
--
--
--    effector:Play();
--
--    compositionBG_01:Play();
--
--    return compositionBG_01;
--end

createCompositionBlik1 = function()

    local compositionBlik1 = CreateCompositionSequence();
    local compositionDuration = 0.56;
    compositionBlik1:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/EF_blik01.jpg');
    element:SetName('Layer_1');
    compositionBlik1:AddElement(element);
    element:SetHotSpot(10, 44);
    element:SetParentElement(compositionBlik1);
    element:SetXY(38.731689453125, 74.5);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 0.56);

    effector:SetKey(_TRACK_O, 0, 0);
    effector:SetKey(_TRACK_O, 0.2, 1);
    effector:SetKey(_TRACK_O, 0.56, 0);

    effector:Play();

    compositionBlik1:Play();

    return compositionBlik1;
end

createCompositionBlik_sea = function()

    local compositionBlik_sea = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionBlik_sea:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = createCompositionBlik1();
    element:SetName('Layer_1');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(715.590728759766, 354.384704589844);

    element:SetScaleX(0.34666666666667);
    element:SetScaleY(0.36);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(8.8, 9.36);


    effector:Play();


    -- Layer Layer_2
    local element = createCompositionBlik1();
    element:SetName('Layer_2');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(671.590728759766, 333.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(8.64, 9.2);


    effector:Play();


    -- Layer Layer_3
    local element = createCompositionBlik1();
    element:SetName('Layer_3');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(707.590728759766, 341.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(8.48, 9.04);


    effector:Play();


    -- Layer Layer_4
    local element = createCompositionBlik1();
    element:SetName('Layer_4');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(587.090728759766, 340.384704589844);

    element:SetScaleX(0.2);
    element:SetScaleY(0.23333333333333);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.96, 8.52);


    effector:Play();


    -- Layer Layer_5
    local element = createCompositionBlik1();
    element:SetName('Layer_5');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(680.590728759766, 351.884704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.76, 8.32);


    effector:Play();


    -- Layer Layer_6
    local element = createCompositionBlik1();
    element:SetName('Layer_6');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(632.590728759766, 348.384704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.52, 8.08);


    effector:Play();


    -- Layer Layer_7
    local element = createCompositionBlik1();
    element:SetName('Layer_7');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(598.590728759766, 353.884704589844);

    element:SetScaleX(0.38666666666667);
    element:SetScaleY(0.32666666666667);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.32, 7.88);


    effector:Play();


    -- Layer Layer_8
    local element = createCompositionBlik1();
    element:SetName('Layer_8');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(715.590728759766, 354.384704589844);

    element:SetScaleX(0.34666666666667);
    element:SetScaleY(0.36);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(6.16, 6.72);


    effector:Play();


    -- Layer Layer_9
    local element = createCompositionBlik1();
    element:SetName('Layer_9');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(671.590728759766, 333.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(6, 6.56);


    effector:Play();


    -- Layer Layer_10
    local element = createCompositionBlik1();
    element:SetName('Layer_10');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(707.590728759766, 341.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.84, 6.4);


    effector:Play();


    -- Layer Layer_11
    local element = createCompositionBlik1();
    element:SetName('Layer_11');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(587.090728759766, 340.384704589844);

    element:SetScaleX(0.2);
    element:SetScaleY(0.23333333333333);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.32, 5.88);


    effector:Play();


    -- Layer Layer_12
    local element = createCompositionBlik1();
    element:SetName('Layer_12');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(680.590728759766, 351.884704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.12, 5.68);


    effector:Play();


    -- Layer Layer_13
    local element = createCompositionBlik1();
    element:SetName('Layer_13');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(632.590728759766, 348.384704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4.88, 5.44);


    effector:Play();


    -- Layer Layer_14
    local element = createCompositionBlik1();
    element:SetName('Layer_14');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(598.590728759766, 353.884704589844);

    element:SetScaleX(0.38666666666667);
    element:SetScaleY(0.32666666666667);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4.68, 5.24);


    effector:Play();


    -- Layer Layer_15
    local element = createCompositionBlik1();
    element:SetName('Layer_15');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(715.590728759766, 354.384704589844);

    element:SetScaleX(0.34666666666667);
    element:SetScaleY(0.36);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(3.72, 4.28);


    effector:Play();


    -- Layer Layer_16
    local element = createCompositionBlik1();
    element:SetName('Layer_16');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(671.590728759766, 333.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(3.56, 4.12);


    effector:Play();


    -- Layer Layer_17
    local element = createCompositionBlik1();
    element:SetName('Layer_17');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(707.590728759766, 341.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(3.4, 3.96);


    effector:Play();


    -- Layer Layer_18
    local element = createCompositionBlik1();
    element:SetName('Layer_18');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(587.090728759766, 340.384704589844);

    element:SetScaleX(0.2);
    element:SetScaleY(0.23333333333333);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.88, 3.44);


    effector:Play();


    -- Layer Layer_19
    local element = createCompositionBlik1();
    element:SetName('Layer_19');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(680.590728759766, 351.884704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.68, 3.24);


    effector:Play();


    -- Layer Layer_20
    local element = createCompositionBlik1();
    element:SetName('Layer_20');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(632.590728759766, 348.384704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.44, 3);


    effector:Play();


    -- Layer Layer_21
    local element = createCompositionBlik1();
    element:SetName('Layer_21');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(598.590728759766, 353.884704589844);

    element:SetScaleX(0.38666666666667);
    element:SetScaleY(0.32666666666667);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.24, 2.8);


    effector:Play();


    -- Layer Layer_22
    local element = createCompositionBlik1();
    element:SetName('Layer_22');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(715.590728759766, 354.384704589844);

    element:SetScaleX(0.34666666666667);
    element:SetScaleY(0.36);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(1.48, 2.04);


    effector:Play();


    -- Layer Layer_23
    local element = createCompositionBlik1();
    element:SetName('Layer_23');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(671.590728759766, 333.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(1.32, 1.88);


    effector:Play();


    -- Layer Layer_24
    local element = createCompositionBlik1();
    element:SetName('Layer_24');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(707.590728759766, 341.384704589844);

    element:SetScaleX(0.26666666666667);
    element:SetScaleY(0.22);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(1.16, 1.72);


    effector:Play();


    -- Layer Layer_25
    local element = createCompositionBlik1();
    element:SetName('Layer_25');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(587.090728759766, 340.384704589844);

    element:SetScaleX(0.2);
    element:SetScaleY(0.23333333333333);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0.64, 1.2);


    effector:Play();


    -- Layer Layer_26
    local element = createCompositionBlik1();
    element:SetName('Layer_26');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(680.590728759766, 351.884704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0.44, 1);


    effector:Play();


    -- Layer Layer_27
    local element = createCompositionBlik1();
    element:SetName('Layer_27');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(632.590728759766, 348.384704589844);

    element:SetScaleX(0.30666666666667);
    element:SetScaleY(0.28);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0.2, 0.76);


    effector:Play();


    -- Layer Layer_28
    local element = createCompositionBlik1();
    element:SetName('Layer_28');
    compositionBlik_sea:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionBlik_sea);
    element:SetXY(598.590728759766, 353.884704589844);

    element:SetScaleX(0.38666666666667);
    element:SetScaleY(0.32666666666667);
    element:SetAngle(1.570796325);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 0.56);


    effector:Play();

    compositionBlik_sea:Play();

    return compositionBlik_sea;
end

createCompositionCaust = function()

    local compositionCaust = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionCaust:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/EF_Caustic_01.jpg');
    element:SetName('Layer_1');
    compositionCaust:AddElement(element);
    element:SetHotSpot(88, 78);
    element:SetParentElement(compositionCaust);
    element:SetXY(129, 109.5);

    element:SetScaleX(0.70454545454545);
    element:SetScaleY(0.75);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);

    effector:SetKey(_TRACK_A, 0, 0);
    effector:SetKey(_TRACK_A, 1.44, 0);
    effector:SetKey(_TRACK_A, 9.96, 0.523598775);
    effector:SetKey(_TRACK_O, 0, 0);
    effector:SetKey(_TRACK_O, 1.4385546875, 0);
    effector:SetKey(_TRACK_O, 3.28, 0.99845353159851);
    effector:SetKey(_TRACK_O, 4.9185546875, 0);
    effector:SetKey(_TRACK_O, 6.6, 0.89845353159851);
    effector:SetKey(_TRACK_O, 8.4785546875, 0);
    effector:SetKey(_TRACK_O, 9.96, 0);

    effector:Play();


    -- Layer Layer_2
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/EF_Caustic_01.jpg');
    element:SetName('Layer_2');
    compositionCaust:AddElement(element);
    element:SetHotSpot(88, 78);
    element:SetParentElement(compositionCaust);
    element:SetXY(72.5, 97.5);

    element:SetScaleX(0.70454545454545);
    element:SetScaleY(0.75);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);

    effector:SetKey(_TRACK_A, 0, 0);
    effector:SetKey(_TRACK_A, 9.96, 0.523598775);
    effector:SetKey(_TRACK_O, 0, 0);
    effector:SetKey(_TRACK_O, 1.4814453125, 0.98551672862454);
    effector:SetKey(_TRACK_O, 2.92, 0);
    effector:SetKey(_TRACK_O, 4.7614453125, 0.98551672862454);
    effector:SetKey(_TRACK_O, 6.4, 0);
    effector:SetKey(_TRACK_O, 8.0814453125, 0.88551672862454);
    effector:SetKey(_TRACK_O, 9.96, 0);

    effector:Play();

    compositionCaust:Play();

    return compositionCaust;
end

createCompositionCaustic_all = function()

    local compositionCaustic_all = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionCaustic_all:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = createCompositionCaust();
    element:SetName('Layer_1');
    compositionCaustic_all:AddElement(element);
    element:SetHotSpot(100, 100);
    element:SetParentElement(compositionCaustic_all);
    element:SetXY(399, 752);

    element:SetScaleX(-1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_2
    local element = createCompositionCaust();
    element:SetName('Layer_2');
    compositionCaustic_all:AddElement(element);
    element:SetHotSpot(100, 100);
    element:SetParentElement(compositionCaustic_all);
    element:SetXY(483, 726);

    element:SetScaleX(-1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_3
    local element = createCompositionCaust();
    element:SetName('Layer_3');
    compositionCaustic_all:AddElement(element);
    element:SetHotSpot(100, 100);
    element:SetParentElement(compositionCaustic_all);
    element:SetXY(552, 696);

    element:SetScaleX(-1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_4
    local element = createCompositionCaust();
    element:SetName('Layer_4');
    compositionCaustic_all:AddElement(element);
    element:SetHotSpot(100, 100);
    element:SetParentElement(compositionCaustic_all);
    element:SetXY(980, 769);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_5
    local element = createCompositionCaust();
    element:SetName('Layer_5');
    compositionCaustic_all:AddElement(element);
    element:SetHotSpot(100, 100);
    element:SetParentElement(compositionCaustic_all);
    element:SetXY(882, 749);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_6
    local element = createCompositionCaust();
    element:SetName('Layer_6');
    compositionCaustic_all:AddElement(element);
    element:SetHotSpot(100, 100);
    element:SetParentElement(compositionCaustic_all);
    element:SetXY(762, 716);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_7
    local element = createCompositionCaust();
    element:SetName('Layer_7');
    compositionCaustic_all:AddElement(element);
    element:SetHotSpot(100, 100);
    element:SetParentElement(compositionCaustic_all);
    element:SetXY(644, 678);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();

    compositionCaustic_all:Play();

    return compositionCaustic_all;
end

createCompositionDino = function()

    local compositionDino = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionDino:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/dinoRun_[0000-0009].png');
    element:SetName('Layer_1');
    compositionDino:AddElement(element);
    element:SetHotSpot(89, 31.5);
    element:SetParentElement(compositionDino);
    element:SetAngle(0.1646003251349);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);

    effector:SetKey(_TRACK_X, 0, 1116.30586242676);
    effector:SetKey(_TRACK_Y, 0, 596.72900390625);
    effector:SetKey(_TRACK_X, 9.96, 103.206024169922);
    effector:SetKey(_TRACK_Y, 9.96, 438.24089050293);
    effector:SetKey(_TRACK_SX, 0, 1);
    effector:SetKey(_TRACK_SY, 0, 1);
    effector:SetKey(_TRACK_SX, 9.96, 0.8);
    effector:SetKey(_TRACK_SY, 9.96, 0.8);

    effector:Play();

    compositionDino:Play();

    return compositionDino;
end

createCompositionPool = function()

    local compositionPool = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionPool:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/Layer01.png');
    element:SetName('Layer_1');
    compositionPool:AddElement(element);
    element:SetHotSpot(32, 64);
    element:SetParentElement(compositionPool);
    element:SetXY(578, 692);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_2
    local element = createCompositionWater_Bliki_all();
    element:SetName('Layer_2');
    compositionPool:AddElement(element);
    element:SetHotSpot(512, 384);
    element:SetParentElement(compositionPool);
    element:SetXY(512, 384);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_3
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/Water2.png');
    element:SetName('Layer_3');
    compositionPool:AddElement(element);
    element:SetHotSpot(299, 54);
    element:SetParentElement(compositionPool);
    element:SetXY(672, 716);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);

    effector:SetKey(_TRACK_O, 0, 0);
    effector:SetKey(_TRACK_O, 0.76, 1);
    effector:SetKey(_TRACK_O, 1.6, 0);
    effector:SetKey(_TRACK_O, 2.68, 1);
    effector:SetKey(_TRACK_O, 3.8, 0);
    effector:SetKey(_TRACK_O, 4.88, 1);
    effector:SetKey(_TRACK_O, 5.88, 0);
    effector:SetKey(_TRACK_O, 6.92, 1);
    effector:SetKey(_TRACK_O, 8.08, 0);
    effector:SetKey(_TRACK_O, 9.04, 1);
    effector:SetKey(_TRACK_O, 9.96, 0);

    effector:Play();


    -- Layer Layer_4
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/Water1.png');
    element:SetName('Layer_4');
    compositionPool:AddElement(element);
    element:SetHotSpot(299, 54);
    element:SetParentElement(compositionPool);
    element:SetXY(671.677230834961, 716.813858032227);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);

    effector:SetKey(_TRACK_O, 0, 1);
    effector:SetKey(_TRACK_O, 0.76, 0);
    effector:SetKey(_TRACK_O, 1.6, 1);
    effector:SetKey(_TRACK_O, 2.68, 0);
    effector:SetKey(_TRACK_O, 3.8, 1);
    effector:SetKey(_TRACK_O, 4.88, 0);
    effector:SetKey(_TRACK_O, 5.88, 1);
    effector:SetKey(_TRACK_O, 6.92, 0);
    effector:SetKey(_TRACK_O, 8.08, 1);
    effector:SetKey(_TRACK_O, 9.04, 0);
    effector:SetKey(_TRACK_O, 9.96, 1);

    effector:Play();


    -- Layer Layer_5
    local element = createCompositionCaustic_all();
    element:SetName('Layer_5');
    compositionPool:AddElement(element);
    element:SetHotSpot(512, 384);
    element:SetParentElement(compositionPool);
    element:SetXY(512, 384);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();

    compositionPool:Play();

    return compositionPool;
end

createCompositionSea = function()

    local compositionSea = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionSea:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = createCompositionBlik_sea();
    element:SetName('Layer_1');
    compositionSea:AddElement(element);
    element:SetHotSpot(512, 384);
    element:SetParentElement(compositionSea);
    element:SetXY(512, 384);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_2
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/Layer_Sea.png');
    element:SetName('Layer_2');
    compositionSea:AddElement(element);
    element:SetHotSpot(125, 40);
    element:SetParentElement(compositionSea);
    element:SetXY(659, 352);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);

    effector:SetKey(_TRACK_O, 0, 0);
    effector:SetKey(_TRACK_O, 0.84, 1);
    effector:SetKey(_TRACK_O, 1.64, 0);
    effector:SetKey(_TRACK_O, 2.36, 1);
    effector:SetKey(_TRACK_O, 3.16, 0);
    effector:SetKey(_TRACK_O, 4.04, 1);
    effector:SetKey(_TRACK_O, 4.84, 0);
    effector:SetKey(_TRACK_O, 5.64, 1);
    effector:SetKey(_TRACK_O, 6.44, 0);
    effector:SetKey(_TRACK_O, 7.24, 1);
    effector:SetKey(_TRACK_O, 8.16, 0);
    effector:SetKey(_TRACK_O, 9.08, 1);
    effector:SetKey(_TRACK_O, 9.96, 0);

    effector:Play();

    compositionSea:Play();

    return compositionSea;
end

createCompositionSeagull1 = function()

    local compositionSeagull1 = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionSeagull1:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/sg_[0000-0009].png');
    element:SetName('Layer_1');
    compositionSeagull1:AddElement(element);
    element:SetHotSpot(20, 11);
    element:SetParentElement(compositionSeagull1);
    element:SetScaleX(-1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 5.52);

    effector:SetKey(_TRACK_X, 0, 83.6435546875);
    effector:SetKey(_TRACK_Y, 0, 22.8118896484375);
    effector:SetKey(_TRACK_X, 0.44, 177.932662963867);
    effector:SetKey(_TRACK_Y, 0.44, 72.9980316162109);
    effector:SetKey(_TRACK_X, 0.8, 249.932662963867);
    effector:SetKey(_TRACK_Y, 0.8, 90.9980316162109);
    effector:SetKey(_TRACK_X, 1.16, 338.932662963867);
    effector:SetKey(_TRACK_Y, 1.16, 95.9980316162109);
    effector:SetKey(_TRACK_X, 1.56, 411.932662963867);
    effector:SetKey(_TRACK_Y, 1.56, 83.9980316162109);
    effector:SetKey(_TRACK_X, 1.96, 473.932662963867);
    effector:SetKey(_TRACK_Y, 1.96, 86.9980316162109);
    effector:SetKey(_TRACK_X, 2.28, 528.932662963867);
    effector:SetKey(_TRACK_Y, 2.28, 113.998031616211);
    effector:SetKey(_TRACK_X, 2.56, 575.932662963867);
    effector:SetKey(_TRACK_Y, 2.56, 145.998031616211);
    effector:SetKey(_TRACK_X, 2.88, 634.932662963867);
    effector:SetKey(_TRACK_Y, 2.88, 158.998031616211);
    effector:SetKey(_TRACK_X, 3.2, 692.932662963867);
    effector:SetKey(_TRACK_Y, 3.2, 145.998031616211);
    effector:SetKey(_TRACK_X, 3.56, 751.932662963867);
    effector:SetKey(_TRACK_Y, 3.56, 116.998031616211);
    effector:SetKey(_TRACK_X, 3.84, 785.932662963867);
    effector:SetKey(_TRACK_Y, 3.84, 79.9980316162109);
    effector:SetKey(_TRACK_X, 4.12, 826.932662963867);
    effector:SetKey(_TRACK_Y, 4.12, 57.9980316162109);
    effector:SetKey(_TRACK_X, 4.48, 885.932662963867);
    effector:SetKey(_TRACK_Y, 4.48, 47.9980316162109);
    effector:SetKey(_TRACK_X, 4.8, 940.932662963867);
    effector:SetKey(_TRACK_Y, 4.8, 49.9980316162109);
    effector:SetKey(_TRACK_X, 5.08, 984.932662963867);
    effector:SetKey(_TRACK_Y, 5.08, 52.9980316162109);
    effector:SetKey(_TRACK_X, 5.4, 1046.93266296387);
    effector:SetKey(_TRACK_Y, 5.4, 60.9980316162109);

    effector:Play();

    compositionSeagull1:Play();

    return compositionSeagull1;
end

createCompositionSeagull2 = function()

    local compositionSeagull2 = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionSeagull2:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/sg_[0000-0009].png');
    element:SetName('Layer_1');
    compositionSeagull2:AddElement(element);
    element:SetHotSpot(20, 11);
    element:SetParentElement(compositionSeagull2);
    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 5.28);

    effector:SetKey(_TRACK_X, 0, 1042);
    effector:SetKey(_TRACK_Y, 0, 85);
    effector:SetKey(_TRACK_X, 0.36, 961);
    effector:SetKey(_TRACK_Y, 0.36, 62);
    effector:SetKey(_TRACK_X, 0.68, 883);
    effector:SetKey(_TRACK_Y, 0.68, 47);
    effector:SetKey(_TRACK_X, 1, 822);
    effector:SetKey(_TRACK_Y, 1, 40);
    effector:SetKey(_TRACK_X, 1.32, 756);
    effector:SetKey(_TRACK_Y, 1.32, 44);
    effector:SetKey(_TRACK_X, 1.68, 692);
    effector:SetKey(_TRACK_Y, 1.68, 59);
    effector:SetKey(_TRACK_X, 2.04, 640);
    effector:SetKey(_TRACK_Y, 2.04, 75);
    effector:SetKey(_TRACK_X, 2.4, 584);
    effector:SetKey(_TRACK_Y, 2.4, 108);
    effector:SetKey(_TRACK_X, 2.76, 531);
    effector:SetKey(_TRACK_Y, 2.76, 133);
    effector:SetKey(_TRACK_X, 3.12, 478);
    effector:SetKey(_TRACK_Y, 3.12, 158);
    effector:SetKey(_TRACK_X, 3.52, 418);
    effector:SetKey(_TRACK_Y, 3.52, 165);
    effector:SetKey(_TRACK_X, 3.88, 369);
    effector:SetKey(_TRACK_Y, 3.88, 161);
    effector:SetKey(_TRACK_X, 4.28, 308);
    effector:SetKey(_TRACK_Y, 4.28, 150);
    effector:SetKey(_TRACK_X, 4.72, 240);
    effector:SetKey(_TRACK_Y, 4.72, 124);
    effector:SetKey(_TRACK_X, 5.16, 138);
    effector:SetKey(_TRACK_Y, 5.16, 87);

    effector:Play();

    compositionSeagull2:Play();

    return compositionSeagull2;
end

createCompositionSeagull3 = function()

    local compositionSeagull3 = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionSeagull3:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/sg_[0000-0009].png');
    element:SetName('Layer_1');
    compositionSeagull3:AddElement(element);
    element:SetHotSpot(20, 11);
    element:SetParentElement(compositionSeagull3);
    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 5.28);

    effector:SetKey(_TRACK_X, 0, 1046);
    effector:SetKey(_TRACK_Y, 0, 37);
    effector:SetKey(_TRACK_X, 0.36, 957);
    effector:SetKey(_TRACK_Y, 0.36, 30);
    effector:SetKey(_TRACK_X, 0.68, 886);
    effector:SetKey(_TRACK_Y, 0.68, 39);
    effector:SetKey(_TRACK_X, 1, 826);
    effector:SetKey(_TRACK_Y, 1, 60);
    effector:SetKey(_TRACK_X, 1.32, 768);
    effector:SetKey(_TRACK_Y, 1.32, 66);
    effector:SetKey(_TRACK_X, 1.68, 704);
    effector:SetKey(_TRACK_Y, 1.68, 59);
    effector:SetKey(_TRACK_X, 2.04, 650);
    effector:SetKey(_TRACK_Y, 2.04, 45);
    effector:SetKey(_TRACK_X, 2.4, 596);
    effector:SetKey(_TRACK_Y, 2.4, 44);
    effector:SetKey(_TRACK_X, 2.76, 535);
    effector:SetKey(_TRACK_Y, 2.76, 57);
    effector:SetKey(_TRACK_X, 3.12, 490);
    effector:SetKey(_TRACK_Y, 3.12, 74);
    effector:SetKey(_TRACK_X, 3.52, 438);
    effector:SetKey(_TRACK_Y, 3.52, 85);
    effector:SetKey(_TRACK_X, 3.88, 383);
    effector:SetKey(_TRACK_Y, 3.88, 86);
    effector:SetKey(_TRACK_X, 4.28, 324);
    effector:SetKey(_TRACK_Y, 4.28, 75);
    effector:SetKey(_TRACK_X, 4.72, 247);
    effector:SetKey(_TRACK_Y, 4.72, 54);
    effector:SetKey(_TRACK_X, 5.16, 156);
    effector:SetKey(_TRACK_Y, 5.16, 26);

    effector:Play();

    compositionSeagull3:Play();

    return compositionSeagull3;
end

createCompositionTop = function()

    local compositionTop = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionTop:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/EF_light4_01.jpg');
    element:SetName('Layer_1');
    compositionTop:AddElement(element);
    element:SetHotSpot(64, 61.5);
    element:SetParentElement(compositionTop);
    element:SetXY(756, 170);

    element:SetScaleX(11.2381955529168);
    element:SetScaleY(13.5931530333071);
    element:SetAngle(0.26012589010455);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);

    effector:SetKey(_TRACK_O, 0, 0.2);
    effector:SetKey(_TRACK_O, 0.8, 0.3);
    effector:SetKey(_TRACK_O, 1.56, 0.1);
    effector:SetKey(_TRACK_O, 2.32, 0.4);
    effector:SetKey(_TRACK_O, 3.08, 0.2);
    effector:SetKey(_TRACK_O, 4.24, 0.4);
    effector:SetKey(_TRACK_O, 5.16, 0.25);
    effector:SetKey(_TRACK_O, 5.96, 0.4);
    effector:SetKey(_TRACK_O, 6.76, 0.2);
    effector:SetKey(_TRACK_O, 7.48, 0.45);
    effector:SetKey(_TRACK_O, 8.32, 0.1);
    effector:SetKey(_TRACK_O, 9.12, 0.45);
    effector:SetKey(_TRACK_O, 9.96, 0.2);

    effector:Play();


    -- Layer Layer_2
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/Layer03.png');
    element:SetName('Layer_2');
    compositionTop:AddElement(element);
    element:SetHotSpot(150, 102);
    element:SetParentElement(compositionTop);
    element:SetXY(158.007919311523, 439.227416992188);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();


    -- Layer Layer_3
    local element = auxCreateCompositionElement2('data/Texture/Scenes/26_Outro/Animations/SarahHome/Layer02.png');
    element:SetName('Layer_3');
    compositionTop:AddElement(element);
    element:SetHotSpot(151, 100);
    element:SetParentElement(compositionTop);
    element:SetXY(149, 96);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 10);


    effector:Play();

    compositionTop:Play();

    return compositionTop;
end

createCompositionWater_Bliki_all = function()

    local compositionWater_Bliki_all = CreateCompositionSequence();
    local compositionDuration = 10;
    compositionWater_Bliki_all:SetDuration(compositionDuration);


    -- Layer Layer_1
    local element = createCompositionBlik1();
    element:SetName('Layer_1');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(520, 730.5);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4, 4.56);


    effector:Play();


    -- Layer Layer_2
    local element = createCompositionBlik1();
    element:SetName('Layer_2');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(881.812881469727, 756.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(6.28, 6.84);


    effector:Play();


    -- Layer Layer_3
    local element = createCompositionBlik1();
    element:SetName('Layer_3');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(805.312881469727, 757.167327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(8.48, 9.04);


    effector:Play();


    -- Layer Layer_4
    local element = createCompositionBlik1();
    element:SetName('Layer_4');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(645.812881469727, 702.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(8.76, 9.32);


    effector:Play();


    -- Layer Layer_5
    local element = createCompositionBlik1();
    element:SetName('Layer_5');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(631.312881469727, 745.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(8.08, 8.64);


    effector:Play();


    -- Layer Layer_6
    local element = createCompositionBlik1();
    element:SetName('Layer_6');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(753.312881469727, 752.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(9, 9.56);


    effector:Play();


    -- Layer Layer_7
    local element = createCompositionBlik1();
    element:SetName('Layer_7');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(753.312881469727, 752.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.96, 8.52);


    effector:Play();


    -- Layer Layer_8
    local element = createCompositionBlik1();
    element:SetName('Layer_8');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(517.312881469727, 757.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.48, 8.04);


    effector:Play();


    -- Layer Layer_9
    local element = createCompositionBlik1();
    element:SetName('Layer_9');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(665.812881469727, 718.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.32, 7.88);


    effector:Play();


    -- Layer Layer_10
    local element = createCompositionBlik1();
    element:SetName('Layer_10');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(462.812881469727, 738.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(7.12, 7.68);


    effector:Play();


    -- Layer Layer_11
    local element = createCompositionBlik1();
    element:SetName('Layer_11');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(462.812881469727, 738.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(6.56, 7.12);


    effector:Play();


    -- Layer Layer_12
    local element = createCompositionBlik1();
    element:SetName('Layer_12');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(633.812881469727, 745.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(9.16, 9.72);


    effector:Play();


    -- Layer Layer_13
    local element = createCompositionBlik1();
    element:SetName('Layer_13');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(633.812881469727, 745.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(6.36, 6.92);


    effector:Play();


    -- Layer Layer_14
    local element = createCompositionBlik1();
    element:SetName('Layer_14');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(746.812881469727, 748.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(6.2, 6.76);


    effector:Play();


    -- Layer Layer_15
    local element = createCompositionBlik1();
    element:SetName('Layer_15');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(828.812881469727, 757.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.76, 6.32);


    effector:Play();


    -- Layer Layer_16
    local element = createCompositionBlik1();
    element:SetName('Layer_16');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(517.812881469727, 755.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.56, 6.12);


    effector:Play();


    -- Layer Layer_17
    local element = createCompositionBlik1();
    element:SetName('Layer_17');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(668.812881469727, 718.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.16, 5.72);


    effector:Play();


    -- Layer Layer_18
    local element = createCompositionBlik1();
    element:SetName('Layer_18');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(627.812881469727, 695.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.08, 5.64);


    effector:Play();


    -- Layer Layer_19
    local element = createCompositionBlik1();
    element:SetName('Layer_19');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(462.812881469727, 753.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(5.32, 5.88);


    effector:Play();


    -- Layer Layer_20
    local element = createCompositionBlik1();
    element:SetName('Layer_20');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(747.812881469727, 751.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4.88, 5.44);


    effector:Play();


    -- Layer Layer_21
    local element = createCompositionBlik1();
    element:SetName('Layer_21');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(633.812881469727, 747.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4.72, 5.28);


    effector:Play();


    -- Layer Layer_22
    local element = createCompositionBlik1();
    element:SetName('Layer_22');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(516.812881469727, 754.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4.16, 4.72);


    effector:Play();


    -- Layer Layer_23
    local element = createCompositionBlik1();
    element:SetName('Layer_23');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(668.812881469727, 719.667327880859);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4.56, 5.12);


    effector:Play();


    -- Layer Layer_24
    local element = createCompositionBlik1();
    element:SetName('Layer_24');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(802.642578125, 759.207916259766);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(4.32, 4.88);


    effector:Play();


    -- Layer Layer_25
    local element = createCompositionBlik1();
    element:SetName('Layer_25');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(682.5, 744);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(3.64, 4.2);


    effector:Play();


    -- Layer Layer_26
    local element = createCompositionBlik1();
    element:SetName('Layer_26');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(624, 728.5);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(3.48, 4.04);


    effector:Play();


    -- Layer Layer_27
    local element = createCompositionBlik1();
    element:SetName('Layer_27');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(804, 758);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.92, 3.48);


    effector:Play();


    -- Layer Layer_28
    local element = createCompositionBlik1();
    element:SetName('Layer_28');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(620.5, 710.5);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.64, 3.2);


    effector:Play();


    -- Layer Layer_29
    local element = createCompositionBlik1();
    element:SetName('Layer_29');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(668, 723.5);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.32, 2.88);


    effector:Play();


    -- Layer Layer_30
    local element = createCompositionBlik1();
    element:SetName('Layer_30');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(779.5, 763);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(2.04, 2.6);


    effector:Play();


    -- Layer Layer_31
    local element = createCompositionBlik1();
    element:SetName('Layer_31');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(516.5, 755);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(1.36, 1.92);


    effector:Play();


    -- Layer Layer_32
    local element = createCompositionBlik1();
    element:SetName('Layer_32');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(714.5, 743);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(1.52, 2.08);


    effector:Play();


    -- Layer Layer_33
    local element = createCompositionBlik1();
    element:SetName('Layer_33');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(631.5, 743);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(1.2, 1.76);


    effector:Play();


    -- Layer Layer_34
    local element = createCompositionBlik1();
    element:SetName('Layer_34');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(714, 745);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0.32, 0.88);


    effector:Play();


    -- Layer Layer_35
    local element = createCompositionBlik1();
    element:SetName('Layer_35');
    compositionWater_Bliki_all:AddElement(element);
    element:SetHotSpot(37.5, 75);
    element:SetParentElement(compositionWater_Bliki_all);
    element:SetXY(667.5, 722);

    element:SetScaleX(1);
    element:SetScaleY(1);
    element:SetAngle(0);
    element:SetOpacity(1);

    effector = element:GetEffector();
    effector:SetLifeTime(0, 0.56);


    effector:Play();

    compositionWater_Bliki_all:Play();

    return compositionWater_Bliki_all;
end
