Esempio 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;
    }
    private void InitMonsterList()
    {
        ClassSingleton <GUIMonsterIconList> .Instance.ResetIconState();

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

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

        if (null != CMD_MultiRecruitPartyWait.Instance)
        {
            this.SetDimmByMonsterDataList(list, CMD_DeckList.SelectMonsterData);
        }
        else
        {
            this.SetDimmByMonsterDataList(CMD_PartyEdit.instance.GetSelectedMD(), CMD_DeckList.SelectMonsterData);
        }
        this.csSelectPanelMonsterIcon.useLocationRecord = true;
        this.csSelectPanelMonsterIcon.SetCheckEnablePushAction(new Func <MonsterData, bool>(this.CheckEnablePush));
        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.SetIconDungeonBonus(this.questBonusPack, this.bonusTargetCheck);
        if (this.sortieLimitList != null)
        {
            this.csSelectPanelMonsterIcon.SetIconSortieLimitParts(this.sortieLimitList);
        }
        BtnSort[] componentsInChildren = base.GetComponentsInChildren <BtnSort>(true);
        this.sortButton = componentsInChildren[0];
        this.sortButton.OnChangeSortType      = new Action(this.OnChangeSortSetting);
        this.sortButton.SortTargetMonsterList = this.targetMonsterList;
    }
    protected override bool CanEnter()
    {
        List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.GROWING_IN_GARDEN);
        return(list.Count < ConstValue.MAX_CHILD_MONSTER);
    }
Esempio n. 4
0
    private int GetCountCanVersionUpMonster()
    {
        List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.CAN_VERSION_UP);
        return(list.Count);
    }
    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);
    }
Esempio n. 6
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;
    }
Esempio n. 7
0
    public void SetAutoActiveCanEvolveParticle()
    {
        bool flag  = false;
        bool flag2 = false;

        base.CancelInvoke("SetActiveCanEvolveParticle");
        List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.GROWING_IN_GARDEN);
        if (0 < list.Count)
        {
            int num = -1;
            flag2 = true;
            for (int i = 0; i < list.Count; i++)
            {
                MonsterData monsterData = list[i];
                if (monsterData.userMonster.IsEgg())
                {
                    flag = true;
                    break;
                }
                TimeSpan timeSpan = DateTime.Parse(monsterData.userMonster.growEndDate) - ServerDateTime.Now;
                if ((int)timeSpan.TotalSeconds <= 0)
                {
                    flag = true;
                    break;
                }
                if (num == -1 || num > (int)timeSpan.TotalSeconds)
                {
                    num = (int)timeSpan.TotalSeconds;
                }
            }
            if (!flag)
            {
                base.Invoke("SetActiveCanEvolveParticle", (float)num);
            }
        }
        this.SetEvolveParticle(flag);
        this.SetGrowthPlate(flag2);
    }
    public void InitMonsterList()
    {
        List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.GROWING_IN_GARDEN);
        MonsterDataMng.Instance().SortMDList(list);
        PushNotice.Instance.SyncGardenPushNoticeData(list);
        if (list.Count == 0)
        {
            this.cautionTextLabel.gameObject.SetActive(true);
            this.cautionTextLabel.text = StringMaster.GetString("Garden-01");
        }
        else if (this.cautionTextLabel.gameObject.activeSelf)
        {
            this.cautionTextLabel.gameObject.SetActive(false);
        }
        if (null != FarmObject_DigiGarden.Instance)
        {
            FarmObject_DigiGarden.Instance.SetAutoActiveCanEvolveParticle();
        }
        this.csSelectPanel.initLocation = true;
        this.goMN_LIST[0].SetActive(true);
        this.csSelectPanel.AllBuild(list, new Action <CMD, string, string>(this.OnBornExec), new Action <MonsterData>(this.OnPushEvolutionButton));
        this.goMN_LIST[0].SetActive(false);
        this.modelUiTex.gameObject.SetActive(list.Count != 0);
        int num = 0;

        foreach (MonsterData monsterData in list)
        {
            if (monsterData.userMonster.eggFlg == "1")
            {
                num++;
            }
        }
        foreach (PicturebookDetailController picturebookDetailController in this.eggControllerList)
        {
            picturebookDetailController.CallMethodOnClick = "OnClickEgg_Dummy";
        }
        int num2 = 0;
        int num3 = 0;

        foreach (MonsterData monsterData2 in list)
        {
            if (monsterData2.userMonster.IsEgg())
            {
                string           eggModelId       = MonsterObject.GetEggModelId(monsterData2.userMonster.monsterEvolutionRouteId);
                CommonRender3DRT commonRender3DRT = this.CreateRender3DRT(true, eggModelId, this.modelUiTex);
                this.SetRender3Dcamera(true, commonRender3DRT, false);
                DigimonActionInGarden digimonActionInGarden = this.AttachActionScript(commonRender3DRT.gameObject, true);
                this.charaActList.Add(digimonActionInGarden);
                this.eggControllerList[num2].CallMethodOnClick = this.callMeyhodsOnEggClick[num3];
                if (num != 1)
                {
                    if (num != 2)
                    {
                        if (num == 3)
                        {
                            num2++;
                            if (num2 != 1)
                            {
                                if (num2 != 2)
                                {
                                    if (num2 == 3)
                                    {
                                        digimonActionInGarden.SetPosition(this.eggPos_3);
                                    }
                                }
                                else
                                {
                                    digimonActionInGarden.SetPosition(this.eggPos_2);
                                }
                            }
                            else
                            {
                                digimonActionInGarden.SetPosition(this.eggPos_1);
                            }
                        }
                    }
                    else
                    {
                        num2++;
                        if (num2 != 1)
                        {
                            if (num2 == 2)
                            {
                                digimonActionInGarden.SetPosition(this.eggPos_2);
                            }
                        }
                        else
                        {
                            digimonActionInGarden.SetPosition(this.eggPos_1);
                        }
                    }
                }
                else
                {
                    digimonActionInGarden.SetPosition(this.eggPos_1);
                }
                digimonActionInGarden.SetDefaultAnimation(this.eggLoopAnimClipList[num3]);
            }
            else
            {
                CommonRender3DRT commonRender3DRT2 = this.CreateRender3DRT(false, monsterData2.GetMonsterMaster().Group.modelId, this.modelUiTex);
                this.SetRender3Dcamera(false, commonRender3DRT2, false);
                DigimonActionInGarden digimonActionInGarden2 = this.AttachActionScript(commonRender3DRT2.gameObject, false);
                this.charaActList.Add(digimonActionInGarden2);
                digimonActionInGarden2.RandomPosition();
                digimonActionInGarden2.WalkAction();
            }
            num3++;
        }
    }