started 			= false
n 				= 0
timer 			= 999
thingsToSay		= 20
thingSaying		= -1
timeToSay		= 7

function init(me)
	n = getNaija()
end

function sayNext()
	if thingSaying == 0 then
		setControlHint("Hi, I'm Derek, one of the two developers of Aquaria!", 0, 0, 0, 16)
	elseif thingSaying == 1 then
		setControlHint("To get you started right away, I'm going to tell you how to get into the editor and start changing stuff on this level!", 0, 0, 0, 16)
	elseif thingSaying == 2 then
		setControlHint("You can hit TAB to toggle editing mode off or on. Once in editing mode, a menu and other options become available. Hit TAB to come back when you're ready to hear more!", 0, 0, 0, 16)
	elseif thingSaying == 3 then
		setControlHint("In the editor, you can hold the middle mouse button or use the A,S,D,W keys to move the view around. Use the scroll wheel or PageUp and PageDown buttons to zoom in and out!", 0, 0, 0, 16)
	elseif thingSaying == 4 then
		setControlHint("There are three main editing modes: Tile Edit, Entity Edit and Node Edit. In the editor, you can switch between these modes quickly using F5, F6 and F7. You can also use the menu at the top of the screen.", 0, 0, 0, 16)
	elseif thingSaying == 5 then
		setControlHint("In Tile Edit Mode, use the Left Mouse Button to drag tiles around. You can also hold right mouse button and drag to rotate them. Try moving these plants next to me!", 0, 0, 0, 16)
	elseif thingSaying == 6 then
		setControlHint("You can hold Shift and press Left Mouse Button to Clone a tile. Try it out!", 0, 0, 0, 16)
	elseif thingSaying == 7 then
		setControlHint("If you hover the cursor over a tile and press the 'E' or 'R' key, you can cycle through the tiles. You can also use E and R to select the 'placer tile'. Drop a new tile by pressing spacebar.", 0, 0, 0, 16)
	elseif thingSaying == 8 then
		setControlHint("Not too hard, right? If you need to delete a tile, press Delete or Backspace.", 0, 0, 0, 16)
	end
end

function update(me, dt)
	if started and node_isEntityIn(me, n) then
		timer = timer + dt
		if timer > timeToSay then
			timer = 0
			thingSaying = thingSaying + 1
			sayNext()
		end
	end
	if not started and node_isEntityIn(me, n) then
		started = true

	end
end
