LoadFile("DATA:levels/utility/tutorial_finger.lua")

local whale_finger = nil
local hint_finger = TapHintTutorialFinger()
local hinted = false

function OnInit()
	for object in World_GetObjects() do
		if object:GetBlueprintName() == "whale" then
			whale_finger = TapObjectTutorialFinger(object)
			break
		end
	end
	hint_finger:Start()
	World_ShowNewItem("whale", "$00801", "$00901")
end

function OnStartSimulation()
	whale_finger:Start()
	hint_finger:Stop()
end

function OnStopSimulation()
	whale_finger:Stop()
	if not hinted then
		hint_finger:Start()
	end
end

function OnWhaleTossEets()
	whale_finger:Stop()
end

function OnGiveHelpButton()
	hint_finger:Stop()
	hinted = true
end

function OnUpdateInModal()
	whale_finger:SetVisible(false)
	hint_finger:SetVisible(false)
end

function OnUpdatePlaying()
	whale_finger:SetVisible(true)
end

function OnUpdateNotPlaying()
	hint_finger:SetVisible(true)
end

function OnUpdateGUI(dt)
	whale_finger:OnUpdate(dt)
	hint_finger:OnUpdate(dt)
end