Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        bool bInit = false;

        if (m_eStepPre != m_eStep)
        {
            m_eStepPre = m_eStep;
            bInit      = true;
        }

        switch (m_eStep)
        {
        case STEP.IDLE:
            if (bInit)
            {
                m_closeButton.TriggerClear();
                m_btnManager.TriggerClearAll();
            }
            if (m_btnManager.ButtonPushed)
            {
                m_eStep = STEP.CHECK;
                //m_btnManager.Index;
            }
            if (m_closeButton.ButtonPushed)
            {
                m_eStep = STEP.END;
            }
            break;

        case STEP.CHECK:
            if (bInit)
            {
                CsvChapterParam param = DataManager.Instance.csv_chapter.list [m_btnManager.Index];
                m_chapterCheck = PrefabManager.Instance.MakeScript <ChapterCheck> ("prefab/ChapterCheck", gameObject);
                m_chapterCheck.Initialize(param);
            }
            if (m_chapterCheck.IsEnd())
            {
                Destroy(m_chapterCheck.gameObject);
                m_eStep = STEP.IDLE;
            }
            break;

        case STEP.END:
            if (bInit)
            {
                m_bIsEnd = true;
                NendAdInterstitial.Instance.Show();
            }
            break;

        case STEP.MAX:
        default:
            break;
        }
    }
Ejemplo n.º 2
0
    public void Initialize(CsvChapterParam _param)
    {
        m_iScriptId     = _param.script_id;
        m_chapterBanner = PrefabManager.Instance.MakeScript <ChapterBanner> ("prefab/ChapterBanner", gameObject);
        m_chapterBanner.Initialize(_param);

        if (m_chapterBanner.m_bAble == false)
        {
            m_lbText.text = "まだこのチャプターは\n開始できません";
            m_btnYes.gameObject.SetActive(false);
        }
        m_eStep    = STEP.IDLE;
        m_eStepPre = STEP.MAX;
    }
Ejemplo n.º 3
0
 public void Initialize(CsvChapterParam _param)
 {
     Initialize(_param.chapter_id, _param.script_id, _param.title, _param.name);
     return;
 }