コード例 #1
0
        private RecentPartyPanel CreatePartyPanel(UnitData[] party, SupportData support, RecentPartyList.JSON_List record, SRPG_Button.ButtonClickEvent buttonClickCallback)
        {
            RecentPartyPanel component = (RecentPartyPanel)((GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)((Component)this.PartyPanelTemplate).get_gameObject())).GetComponent <RecentPartyPanel>();

            component.SetPartyInfo(party, support, this.mCurrentQuest);
            component.SetUnitIconPressedCallback(buttonClickCallback);
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component.UserName, (UnityEngine.Object)null))
            {
                component.UserName.set_text(record.detail.my.name);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component.Level, (UnityEngine.Object)null))
            {
                component.Level.set_text(record.detail.my.lv.ToString());
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component.ClearDate, (UnityEngine.Object)null))
            {
                component.ClearDate.set_text(this.GetClearedTime(record.created_at));
            }
            if (component.ConditionStars != null)
            {
                for (int index = 0; index < record.achieved.Length && index < component.ConditionStars.Length; ++index)
                {
                    component.ConditionStars[index].SetActive(record.achieved[index] != 0);
                }
            }
            if (component.ConditionItems != null && this.mCurrentQuest.type == QuestTypes.Tower && component.ConditionItems.Length >= 3)
            {
                component.ConditionItems[2].SetActive(false);
            }
            ((Component)component).get_gameObject().SetActive(true);
            return(component);
        }
コード例 #2
0
        private void LoadAllParties(RecentPartyList.JSON_List[] winRecords)
        {
            int num = 0;

            foreach (RecentPartyList.JSON_List winRecord in winRecords)
            {
                int index = num;
                SRPG_Button.ButtonClickEvent buttonClickEvent = (SRPG_Button.ButtonClickEvent)(b => this.OnButtonClick(index));
                if (winRecord.id > this.mUnitId)
                {
                    this.mUnitId = winRecord.id;
                }
                UnitData[]  party         = this.LoadParty((IEnumerable <Json_Unit>)winRecord.detail.my.units);
                SupportData support       = this.LoadHelpUnit(winRecord.detail.help);
                ItemData[]  itemDataArray = this.LoadUsedItems(winRecord.detail.items);
                this.allParties.Add(((IEnumerable <UnitData>)party).ToArray <UnitData>());
                this.allHelpUnits.Add(support);
                this.allAchieves.Add(winRecord.achieved);
                this.allUsedItems.Add(itemDataArray);
                RecentPartyPanel partyPanel = this.CreatePartyPanel(party, support, winRecord, buttonClickEvent);
                this.allTeamPanel.Add(partyPanel);
                ((Component)partyPanel).get_transform().SetParent(this.PartyPanelHolder.get_gameObject().get_transform(), false);
                SRPG_Button component = (SRPG_Button)((Component)partyPanel).GetComponent <SRPG_Button>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    component.AddListener(buttonClickEvent);
                }
                ++num;
            }
        }
コード例 #3
0
        private void LoadAllParties(RecentPartyList.JSON_List[] winRecords)
        {
            int num = 0;

            foreach (RecentPartyList.JSON_List winRecord in winRecords)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: reference to a compiler-generated method
                SRPG_Button.ButtonClickEvent buttonClickEvent = new SRPG_Button.ButtonClickEvent(new RecentPartyList.\u003CLoadAllParties\u003Ec__AnonStorey375()
                {
                    \u003C\u003Ef__this = this, index = num
                }.\u003C\u003Em__3FF);
                if (winRecord.id > this.mUnitId)
                {
                    this.mUnitId = winRecord.id;
                }
                UnitData[]  party         = this.LoadParty((IEnumerable <Json_Unit>)winRecord.detail.my.units);
                SupportData support       = this.LoadHelpUnit(winRecord.detail.help);
                ItemData[]  itemDataArray = this.LoadUsedItems(winRecord.detail.items);
                this.allParties.Add(party);
                this.allHelpUnits.Add(support);
                this.allAchieves.Add(winRecord.achieved);
                this.allUsedItems.Add(itemDataArray);
                RecentPartyPanel partyPanel = this.CreatePartyPanel(party, support, winRecord, buttonClickEvent);
                this.allTeamPanel.Add(partyPanel);
                ((Component)partyPanel).get_transform().SetParent(this.PartyPanelHolder.get_gameObject().get_transform(), false);
                SRPG_Button component = (SRPG_Button)((Component)partyPanel).GetComponent <SRPG_Button>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    component.AddListener(buttonClickEvent);
                }
                ++num;
            }
        }
コード例 #4
0
        private RecentPartyPanel CreatePartyPanel(UnitData[] party, SupportData support, RecentPartyList.JSON_List record, SRPG_Button.ButtonClickEvent buttonClickCallback)
        {
            RecentPartyPanel component = (RecentPartyPanel)((GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)((Component)this.PartyPanelTemplate).get_gameObject())).GetComponent <RecentPartyPanel>();

            component.SetPartyInfo(party, support, this.mCurrentQuest);
            component.SetUnitIconPressedCallback(buttonClickCallback);
            component.SetUserName(record.detail.my.name);
            component.SetUserRank(record.detail.my.lv.ToString());
            component.SetClearDate(this.GetClearedTime(record.created_at));
            for (int index = 0; index < record.achieved.Length; ++index)
            {
                component.SetConditionStarActive(index, record.achieved[index] != 0);
            }
            if (this.mCurrentQuest.type == QuestTypes.Tower)
            {
                component.SetConditionItemActive(2, false);
            }
            ((Component)component).get_gameObject().SetActive(true);
            return(component);
        }