dofile('data/Scenes/1_Booth_Anim_phone_calling.lua')

function OnSceneLoad(screen)
    LoadData(screen)

    ---------------------------------------------------------------------------------------------
    local anim_phone_calling = createComposition_phone_calling()
    anim_phone_calling:AttachTo(screen)
    anim_phone_calling:SetZ(185)
    anim_phone_calling:SetCyclic(true)
    
    local sound_call_phone = MakeSoundEntity("01_call_phone")
    sound_call_phone:AttachTo(screen)
    sound_call_phone:Play(true)
    ---------------------------------------------------------------------------------------------

    local tutorial = TutorialScreen:New(screen, 'COMICS_1_BOOTH_INPUT_TELEFON')
    tutorial:SetPos(600, 200)
    tutorial:SetOffsetPosText(0, 70)
    tutorial:HideBttnSkip()
    game_state.tutorial = tutorial
    
    local arrow = screen:GetObject('TutorialArrow')
    local af = CreateAnimationEffector()
    af:AttachTo( arrow )
    af:SetMode(_ANIM_LOOP)
    af:SetKey(_TRACK_X, 0.0, arrow:GetX())
    af:SetKey(_TRACK_Y, 0.0, arrow:GetY())
    af:SetKey(_TRACK_X, 0.5, arrow:GetX() + 0)
    af:SetKey(_TRACK_Y, 0.5, arrow:GetY() - 25)
    af:SetKey(_TRACK_X, 1.0, arrow:GetX())
    af:SetKey(_TRACK_Y, 1.0, arrow:GetY())
    af:Play()
    ---------------------------------------------------------------------------------------------
end

function OnSceneFree()
    FreeData()
end

function OnScreenShown()
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
end

function OnLose()
end

function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    local current_screen = GetGameManager():GetCurrentScreen()

    if object:GetName() == 'pixel_phone_calling' then
        FinishComics(true)
        FlyPhone()
    end
end

function OnObjectMouseUp(object)
end

function OnObjectRightMouseDown(object)
end

function OnObjectRightMouseUp(object)
end

function OnObjectFound(object)
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)
end

function OnObjectReachPanel(object)
end

function OnPhotographing()
	DefaultOnPhotographing()
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function OnMinigameCompleted()
end

function OnLostFocus()
end

function OnGainFocus()
end

-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function LoadData(screen)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_shadow',anim,512,384,150,0,128,96)
	local anim = CreateAnimation('data/Texture/Comics/TutorialArrow.png',0,0,64,32,1,0)
	anim:SetHotSpot(32,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('TutorialArrow',anim,491,509,200,90,1.5,1.5)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('pixel_phone_calling',anim,489,569,190,0,10,5)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
