tutorial = tutorial or {}

tutorial.tutorial_timer = sf.core.CTimerWrapper(sf.core.g_Application.GetTimeManager().GetTimer(_T("qe_level")).AttachTimer(_T("")))

tutorial.pre_arrow_delay = 5000

tutorial.last_correct_action_time = 0

function tutorial.is_pre_arrow_delay(_time)
    if _time == nil then
        _time = tutorial.pre_arrow_delay
    end
	local current_time = tutorial.tutorial_timer.Get().GetTime()
	if current_time - tutorial.last_correct_action_time < _time then
		return true
	end
	return false
end

function tutorial.LoadConstants(_constants)

    local tutorial_info = _constants.GetChildRef("tutorial", false)
    if tutorial_info then
        local res = tonumber(tutorial_info.GetValue("pre_arrow_delay").c_str())
        if res ~= nil then
            tutorial.pre_arrow_delay = res
        end
    end
end

function tutorial.drop_timer()
		tutorial.last_correct_action_time = tutorial.tutorial_timer.Get().GetTime()
end
