function OnSceneLoad(screen)
    LoadData(screen) 
end

function CreateOneSMS(text)
    local sms_1 = ComicsTecho:New('sms')
    sms_1:CreateSMS( GetString(text), 1 )
    
    local generator = AutoGeneratorComics:New()
    generator:AddObject(sms_1)
    game_state.generator = generator 
end

function OnSceneFree()
    FreeData()
end

function OnScreenShown()
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)

    if game_state.generator and game_state.generator:Update(dt) then
        FinishComics(true)
    end  
end

function OnLose()
end

function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    game_state.generator:PlayNext()
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 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/animation/sms/message.png',0,0,494,383,1,0)
	anim:SetHotSpot(247,191)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('message',anim,512,384,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
