:NAME killtimer_tutorial

:GLOBAL int32					state
:GLOBAL float32					timer
:GLOBAL float32					focus_start_time
:GLOBAL float32					focus_start_scale
:GLOBAL c_object*				focus
:GLOBAL c_object*				message

local tutoriallib = require "scripts/tutorial_utils"
local state= nil

function global_initialize(g)
	g.state= 0
	g.focus= nil
	g.timer= 0
	g.focus_start_time= 0
	g.focus_start_scale= tutoriallib.k_scale_out	
	g.message= nil
end

-- ------------------ delay, then tell about the kill timer ------------------

tutoriallib.add_delay(2)

state= tutoriallib.make_state("message1")
tutoriallib.focus_on(state, "killtimer_marker", 1)

state= tutoriallib.make_state("message2", true)

state= tutoriallib.add_delay(0.1)
function remove_bubbles()
	tutoriallib.remove_bubble("message1")
	tutoriallib.remove_bubble("message2")
end
state.start_func= remove_bubbles

-- ------------ init and update ------------

function global_initialize(g)
	g.state= 0
	g.focus= nil
	g.timer= 0
	g.focus_start_time= 0
	g.focus_start_scale= tutoriallib.k_scale_out	
	g.message= nil
end

function start()

	local world= world_get()
	local ws= world_state_get()
	global.focus= object_place("focus")
	global.focus.hide(true)
	tutoriallib.start()

end


function update()
	tutoriallib.update(k_states, global)
end

system_register(start, update, nil, nil)
