Esempio n. 1
0
    public override void CreateButton(int index, GameObject page, int buttonIndex)
    {
        print(page.name);
        ButtonBase button = page.GetComponent <ButtonBase> ();
        int        num    = (StringKit.toInt(page.name) - 1);

        num = num < 0 ? 0 : num;
        int sid = FuBenManagerment.getAllShowStoryChapter(1)[num];

        button.textLabel.text = ChapterSampleManager.Instance.getChapterSampleBySid(sid).name;
    }
Esempio n. 2
0
    public override void initAllButton(GameObject each)
    {
//		print (each.name);
        base.initAllButton(each);
        ButtonBase button = each.GetComponent <ButtonBase> ();
        int        num    = (StringKit.toInt(each.name) - 1);

        num = num < 0 ? 0 : num;
        int sid = FuBenManagerment.getAllShowStoryChapter(1)[num];

        button.textLabel.text = ChapterSampleManager.Instance.getChapterSampleBySid(sid).name;
    }
    //显示章节
    private void showChapter()
    {
        List <ChapterSample> cs = new List <ChapterSample>();

        int[] chapterIDs = FuBenManagerment.getAllShowStoryChapter(1);
        for (int i = 0; i < chapterIDs.Length; i++)
        {
            ChapterSample sample = ChapterSampleManager.Instance.getChapterSampleBySid(chapterIDs[i]);
            cs.Add(sample);
        }
        cs.Reverse();
        if (content.gameObject.activeSelf)
        {
            content.init(cs);
        }
        MaskWindow.UnlockUI();
    }
Esempio n. 4
0
    public void setIsShows(int mapid, bool[] isShows, CallBack callback)
    {
        this.mapId    = mapid;
        this.moveOver = callback;
        int max = checkPointList.Length;

        for (int i = 0; i < max; i++)
        {
            int id  = StringKit.toInt(checkPointList [i].name.Substring(8));
            int sid = FuBenManagerment.getStoryChapterByIndex(mapId, i + 1);
            checkPointList [i].textLabel.text = ChapterSampleManager.Instance.getChapterSampleBySid(sid).name;
            checkPointList [i].gameObject.SetActive(isShows [i]);
            if (isShows [i])
            {
                maxIndex = i;
            }
        }
        onMove();
    }