package com.gamedog.vididin.manager

import com.ama.core.architecture.util.SpUtil


class GuideManager private constructor() {
    companion object {
        @Volatile
        private var instance: GuideManager? = null

        fun instance(): GuideManager {
            return instance ?: synchronized(this) {
                instance ?: GuideManager().also {
                    instance = it
                }
            }
        }
    }

    private var mGuideIndex = SpUtil.instance().getInt(SpUtil.KEY_GUIDE_HAS_SHOW)

    public fun getCurGuideIndex(): Int {
        return mGuideIndex
    }

    public fun setGuideIndex(newIndex: Int) {
        mGuideIndex = newIndex
        SpUtil.instance().putInt(SpUtil.KEY_GUIDE_HAS_SHOW, newIndex)
    }

}