Ejemplo n.º 1
0
    private void InitMonsterList(bool initLoc = true)
    {
        ClassSingleton <GUIMonsterIconList> .Instance.ResetIconState();

        MonsterDataMng     monsterDataMng = MonsterDataMng.Instance();
        List <MonsterData> list           = monsterDataMng.GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.ALL_OUT_GARDEN);
        monsterDataMng.SortMDList(list);
        monsterDataMng.SetSortLSMessage();
        this.csSelectPanelMonsterIcon.initLocation = initLoc;
        Vector3 localScale = this.goMN_ICON_LIST[0].transform.localScale;

        ClassSingleton <GUIMonsterIconList> .Instance.SetLockIcon();

        this.csSelectPanelMonsterIcon.SetCheckEnablePushAction(null);
        this.csSelectPanelMonsterIcon.useLocationRecord = true;
        this.targetMonsterList = list;
        list = MonsterDataMng.Instance().SelectionMDList(list);
        this.csSelectPanelMonsterIcon.AllBuild(list, localScale, new Action <MonsterData>(this.ActMIconLong), new Action <MonsterData>(this.ActMIconShort), false);
        this.csSelectPanelMonsterIcon.ClearIconDungeonBonus();
        BtnSort[] componentsInChildren = base.GetComponentsInChildren <BtnSort>(true);
        this.sortButton = componentsInChildren[0];
        this.sortButton.OnChangeSortType      = new Action(this.OnChangeSortSetting);
        this.sortButton.SortTargetMonsterList = this.targetMonsterList;
    }
Ejemplo n.º 2
0
    protected override bool CanSelectMonster(int idx)
    {
        MonsterDataMng     monsterDataMng = MonsterDataMng.Instance();
        List <MonsterData> list           = monsterDataMng.GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.RESEARCH_TARGET);
        monsterDataMng.SortMDList(list);
        return(list.Count > 1);
    }
Ejemplo n.º 3
0
    private void InitMonsterList(bool initLoc = true)
    {
        ClassSingleton <GUIMonsterIconList> .Instance.ResetIconState();

        MonsterDataMng     monsterDataMng = MonsterDataMng.Instance();
        List <MonsterData> list           = monsterDataMng.GetMonsterDataList();

        this.ngTX_MN_HAVE_ADULT.text = this.GetDigiHouseMonsterNum(list).ToString();
        int gerdenMonsterNum = this.GetGerdenMonsterNum(list);

        this.ngTX_MN_HAVE_CHILD.text = gerdenMonsterNum.ToString();
        this.growingNum = this.GetGardenGrowingMonsterNum(list);
        if ((CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.GARDEN || CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.GARDEN_SELL) && gerdenMonsterNum == 0)
        {
            this.cautionLabel.gameObject.SetActive(true);
            this.cautionLabel.text = StringMaster.GetString("Garden-02");
        }
        else if (this.cautionLabel.gameObject.activeSelf)
        {
            this.cautionLabel.gameObject.SetActive(false);
        }
        if (CMD_FarewellListRun.Mode != CMD_FarewellListRun.MODE.GARDEN && CMD_FarewellListRun.Mode != CMD_FarewellListRun.MODE.GARDEN_SELL)
        {
            list = MonsterFilter.Filter(list, MonsterFilterType.ALL_OUT_GARDEN);
        }
        else
        {
            list = MonsterFilter.Filter(list, MonsterFilterType.ALL_IN_GARDEN);
        }
        monsterDataMng.SortMDList(list);
        monsterDataMng.SetSortLSMessage();
        this.csSelectPanelMonsterIcon.initLocation = initLoc;
        Vector3 localScale = this.goMN_ICON_LIST[0].transform.localScale;

        ClassSingleton <GUIMonsterIconList> .Instance.SetLockIcon();

        this.csSelectPanelMonsterIcon.useLocationRecord = true;
        this.csSelectPanelMonsterIcon.SetCheckEnablePushAction(null);
        this.targetMonsterList = list;
        list = MonsterDataMng.Instance().SelectionMDList(list);
        this.csSelectPanelMonsterIcon.AllBuild(list, localScale, new Action <MonsterData>(this.ActMIconLong), new Action <MonsterData>(this.ActMIconShort), false);
        this.csSelectPanelMonsterIcon.ScrollBarPosX   = 458f;
        this.csSelectPanelMonsterIcon.ScrollBarBGPosX = 458f;
        this.csSelectPanelMonsterIcon.ClearIconDungeonBonus();
        BtnSort[] componentsInChildren = base.GetComponentsInChildren <BtnSort>(true);
        this.sortButton = componentsInChildren[0];
        this.sortButton.OnChangeSortType      = new Action(this.OnChangeSortSetting);
        this.sortButton.SortTargetMonsterList = this.targetMonsterList;
    }