private void SetSelectedChar() { if (CMD_DeckList.SelectMonsterData != null) { Transform transform = this.goMN_ICON_NOW.transform; GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(CMD_DeckList.SelectMonsterData, transform.localScale, transform.localPosition, transform.parent, true, false); this.goMN_ICON_NOW_2 = guimonsterIcon.gameObject; this.goMN_ICON_NOW_2.SetActive(true); guimonsterIcon.Data = CMD_DeckList.SelectMonsterData; guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong)); UIWidget component = this.goMN_ICON_NOW.GetComponent <UIWidget>(); UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>(); if (null != component && null != component2) { int add = component.depth - component2.depth; DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>(); component3.AddWidgetDepth(guimonsterIcon.transform, add); } this.goMN_ICON_NOW.SetActive(false); QuestBonusPack questBonusPack = new QuestBonusPack { bonusChipIds = QuestBonusFilter.GetActivateBonusChips(CMD_DeckList.SelectMonsterData, this.questBonusPack.bonusChipIds), eventBonuses = QuestBonusFilter.GetActivateEventBonuses(this.bonusTargetCheck, CMD_DeckList.SelectMonsterData, this.questBonusPack.eventBonuses), dungeonBonuses = QuestBonusFilter.GetActivateDungeonBonuses(this.bonusTargetCheck, CMD_DeckList.SelectMonsterData, this.questBonusPack.dungeonBonuses) }; guimonsterIcon.Gimmick = questBonusPack.ExistBonus(); } }
public void BlockPartyUsed(GUIMonsterIcon icon) { icon.DimmMess = StringMaster.GetString("CharaIcon-04"); icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SetTouchAct_S(this.blockStateAction.onTouch); icon.SetTouchAct_L(this.blockStateAction.onPress); }
public void BlockLockIconReturnDetailed(GUIMonsterIcon icon) { icon.DimmMess = string.Empty; icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SetTouchAct_S(this.blockStateAction.onTouch); icon.SetTouchAct_L(this.blockStateAction.onPress); }
private void ActMIconShort(MonsterData md) { GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(md); if (this.baseDigimon == null) { this.iconGrayOut.SetSelect(icon); this.baseDigimon = md; this.leftLargeMonsterIcon = this.ShowCreateIcon(md, this.goMN_ICON_CHG); this.ShowChgInfo(); this.monsterList.SetGrayOutDeckMonster(this.baseDigimon); this.monsterList.SetGrayOutUserMonsterList(this.baseDigimon); } else if (1 > this.selecterPartnerDigimons.Count) { this.iconGrayOut.SetSelectPartnerIcon(icon); this.selecterPartnerDigimons.Add(md); GUIMonsterIcon item = this.ShowCreateIcon(this.selecterPartnerDigimons[0], this.goMN_ICON_MAT_LIST[0]); this.targetMonsterIconList.Add(item); this.ShowMATInfo(); } else { this.iconGrayOut.SetSelectPartnerIcon(icon); this.ActMIconS_Remove(this.selecterPartnerDigimons[0]); this.selecterPartnerDigimons.Add(md); GUIMonsterIcon item2 = this.ShowCreateIcon(this.selecterPartnerDigimons[0], this.goMN_ICON_MAT_LIST[0]); this.targetMonsterIconList.Add(item2); this.ShowMATInfo(); } this.BtnCont(); }
public void SetSelectPartner(GUIMonsterIcon icon, int iconNumber) { icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SelectNum = iconNumber; icon.SetTouchAct_S(this.selectedStateAction.onTouch); icon.SetTouchAct_L(this.selectedStateAction.onPress); }
public void SetSelect(GUIMonsterIcon icon) { icon.DimmMess = StringMaster.GetString("SystemSelect"); icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SetTouchAct_S(this.selectedStateAction.onTouch); icon.SetTouchAct_L(this.selectedStateAction.onPress); }
private void StartCutSceneCallBack() { this.leftLargeMonsterIcon.Data = this.baseDigimon; GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.baseDigimon); this.iconGrayOut.SetSelect(icon); for (int i = 0; i < this.selecterPartnerDigimons.Count; i++) { UnityEngine.Object.Destroy(this.targetMonsterIconList[i].gameObject); this.goMN_ICON_MAT_LIST[i].SetActive(true); } this.selecterPartnerDigimons = new List <MonsterData>(); this.targetMonsterIconList.Clear(); DataMng.Instance().US_PlayerInfoSubChipNum(this.useClusterBK); this.UpdateClusterNum(); this.baseMonsterSkillTab1.Off(); this.baseMonsterSkillTab2.Off(); this.baseMonsterSkillTab2.SetActive(false); this.materialMonsterSkillTab1.Off(); this.materialMonsterSkillTab2.Off(); this.materialMonsterSkillTab2.SetActive(false); this.ShowChgInfo(); this.ShowMATInfo(); this.monsterList.SetGrayOutDeckMonster(this.baseDigimon); this.monsterList.SetGrayOutUserMonsterList(this.baseDigimon); this.BtnCont(); this.detailedWindow = CMD_CharacterDetailed.CreateWindow(this.baseDigimon, delegate() { this.leftLargeMonsterIcon.Lock = this.baseDigimon.userMonster.IsLocked; icon.Lock = this.baseDigimon.userMonster.IsLocked; }, 1); }
public void SetType(BattleMonsterButton.Type type) { this.selectFrame.gameObject.SetActive(type == BattleMonsterButton.Type.Select); int num = (type != BattleMonsterButton.Type.Dead) ? 0 : 1; this.baseFrame.atlas = this.uiAtlases[num]; this.bgFrame.atlas = this.uiAtlases[num]; this.flashFrame.atlas = this.uiAtlases[num]; if (this.charaTexture.material == null) { this.charaTexture.shader = this.materials[num].shader; } else if ((type == BattleMonsterButton.Type.Dead && this.iconType != BattleMonsterButton.Type.Dead) || (type != BattleMonsterButton.Type.Dead && this.iconType == BattleMonsterButton.Type.Dead)) { this.iconType = type; Texture texture = this.charaTexture.material.GetTexture("_MaskTex"); Texture texture2 = this.charaTexture.material.GetTexture("_MainTex"); if (type == BattleMonsterButton.Type.Dead) { Shader iconShaderGray = GUIMonsterIcon.GetIconShaderGray(); this.charaTexture.material = new Material(iconShaderGray); this.charaTexture.material.SetTexture("_MaskTex", texture); this.charaTexture.material.SetTexture("_MainTex", texture2); } else { Shader iconShader = GUIMonsterIcon.GetIconShader(); this.charaTexture.material = new Material(iconShader); this.charaTexture.material.SetTexture("_MaskTex", texture); this.charaTexture.material.SetTexture("_MainTex", texture2); } } }
public void ApplyMonsterButtonIcon(CharacterStateControl characterStatus, bool isLeader, string resourcePath, string assetBundlePath) { GUIMonsterIcon.SetTextureMonsterParts(this.monsterIconTexture, resourcePath, assetBundlePath, true); this.frame.SetEvolutionStep(characterStatus.characterDatas.growStep); this.SetArousal(characterStatus.arousal); this.ApplyLeaderIcon(isLeader); }
private void ActMIconShort(MonsterData tappedMonsterData) { if (CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.SHOW) { this.ShowMonsterDetailForList(tappedMonsterData); } else if (CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.SELL || CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.GARDEN_SELL) { if (10 > this.sellMonsterList.Count) { this.sellMonsterList.Add(tappedMonsterData); GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(tappedMonsterData); this.iconGrayOut.SetSellMonster(icon, this.sellMonsterList.Count); if (this.sellMonsterList.Count == 10) { this.SetGrayOutNotSelectedIcon(); } this.BTSeleOn(); } } else if (CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.GARDEN) { CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(delegate(int selectButtonIndex) { this.CallbackConfirmMove(selectButtonIndex, tappedMonsterData); }, "CMD_Confirm", null) as CMD_Confirm; cmd_Confirm.Title = StringMaster.GetString("Garden-03"); cmd_Confirm.Info = StringMaster.GetString("Garden-04"); cmd_Confirm.BtnTextYes = StringMaster.GetString("SystemButtonYes"); cmd_Confirm.BtnTextNo = StringMaster.GetString("SystemButtonNo"); } }
private void SetSelectedCharChg(MonsterData monster) { this.changeMonsterData = monster; if (null != this.goMN_ICON_CHG_2) { UnityEngine.Object.Destroy(this.goMN_ICON_CHG_2); } Transform transform = this.goMN_ICON_CHG.transform; GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.changeMonsterData, transform.localScale, transform.localPosition, transform.parent, true, false); this.goMN_ICON_CHG_2 = guimonsterIcon.gameObject; this.goMN_ICON_CHG_2.SetActive(true); guimonsterIcon.Data = this.changeMonsterData; guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actRemoveChg)); guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong)); UIWidget component = this.goMN_ICON_CHG.GetComponent <UIWidget>(); UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>(); if (component != null && component2 != null) { int add = component.depth - component2.depth; DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>(); component3.AddWidgetDepth(guimonsterIcon.transform, add); } this.goMN_ICON_CHG.SetActive(false); guimonsterIcon.Gimmick = ExtraEffectUtil.IsExtraEffectMonster(this.changeMonsterData, this.effectArray); this.SetChangeMonsterData(); }
public void SetMonsterIcon(MonsterData md, bool active) { if (!active) { if (this.monsterIcon != null) { UnityEngine.Object.Destroy(this.monsterIcon.gameObject); this.monsterIcon = null; } } else { if (this.monsterIcon != null) { UnityEngine.Object.Destroy(this.monsterIcon.gameObject); } GameObject gameObject = this.charaIcon.gameObject; this.monsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(md, gameObject.transform.localScale, gameObject.transform.localPosition, gameObject.transform.parent, true, false); UIWidget component = gameObject.GetComponent <UIWidget>(); if (component != null) { DepthController.SetWidgetDepth_Static(this.monsterIcon.gameObject.transform, component.depth + 2); } } }
private void ActMIconLong(MonsterData md) { CMD_CharacterDetailed.DataChg = md; CMD_CharacterDetailed dl = GUIMain.ShowCommonDialog(delegate(int i) { GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(md); icon.Lock = md.userMonster.IsLocked; }, "CMD_CharacterDetailed", null) as CMD_CharacterDetailed; dl.DisableEvolutionButton(); if (null != CMD_MultiRecruitPartyWait.Instance) { dl.PartsTitle.DisableCloseBtn(true); } CMD_BattleNextChoice battleNextChoice = UnityEngine.Object.FindObjectOfType <CMD_BattleNextChoice>(); if (null != battleNextChoice) { dl.PartsTitle.SetCloseAct(delegate(int i) { battleNextChoice.ClosePanel(false); CMD_PartyEdit.instance.ClosePanel(false); CMD_DeckList.instance.ClosePanel(false); dl.SetCloseAction(delegate(int x) { CMD_BattleNextChoice.GoToFarm(); }); dl.ClosePanel(true); }); } }
private void SetSelectedCharChg() { if (this.DataChg != null) { if (null != this.goMN_ICON_CHG_2) { UnityEngine.Object.DestroyImmediate(this.goMN_ICON_CHG_2); } Transform transform = this.goMN_ICON_CHG.transform; GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.DataChg, transform.localScale, transform.localPosition, transform.parent, true, false); this.goMN_ICON_CHG_2 = guimonsterIcon.gameObject; this.goMN_ICON_CHG_2.SetActive(true); guimonsterIcon.Data = this.DataChg; guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actRemoveChg)); guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong)); UIWidget component = this.goMN_ICON_CHG.GetComponent <UIWidget>(); UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>(); if (null != component && null != component2) { int add = component.depth - component2.depth; DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>(); component3.AddWidgetDepth(guimonsterIcon.transform, add); } this.goMN_ICON_CHG.SetActive(false); QuestBonusPack questBonusPack = new QuestBonusPack { bonusChipIds = QuestBonusFilter.GetActivateBonusChips(this.DataChg, this.questBonusPack.bonusChipIds), eventBonuses = QuestBonusFilter.GetActivateEventBonuses(this.bonusTargetCheck, this.DataChg, this.questBonusPack.eventBonuses), dungeonBonuses = QuestBonusFilter.GetActivateDungeonBonuses(this.bonusTargetCheck, this.DataChg, this.questBonusPack.dungeonBonuses) }; guimonsterIcon.Gimmick = questBonusPack.ExistBonus(); } this.ShowChgInfo(); }
public void BlockSpecialTypeMonster(GUIMonsterIcon icon) { icon.DimmMess = string.Empty; icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SetTouchAct_S(this.blockStateAction.onTouch); icon.SetTouchAct_L(this.blockStateAction.onPress); }
private void UpdateMonsterIcon() { if (!this.isUpdate) { if (this.RespDataChatMessageDataResult.type != 3) { this.ngTX_USERNAME.text = this.RespDataChatMessageDataResult.userInfo.nickname; TitleDataMng.SetTitleIcon(this.RespDataChatMessageDataResult.userInfo.titleId, this.ngTITLE_ICON.GetComponent <UITexture>()); this.thumbMid = this.RespDataChatMessageDataResult.userInfo.monsterId; MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.thumbMid); if (monsterData != null) { GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.ngMONSTER_ICON.transform.localScale, this.ngMONSTER_ICON.transform.localPosition, this.ngMONSTER_ICON.transform.parent, true, true); guimonsterIcon.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag) { this.OnThumbnailClicked(); }; DepthController depthController = guimonsterIcon.GetDepthController(); depthController.AddWidgetDepth(guimonsterIcon.transform, 1200); } } if (this.RespDataChatMessageDataResult.type == 4 && DataMng.Instance().UserId != this.RespDataChatMessageDataResult.userId) { this.ngMULTICODE_BCOL.size = new Vector3(this.ngMULTICODE_BCOL.size.x, this.ngMULTICODE_BCOL.size.y, 5f); } this.isUpdate = true; } }
public void BlockMedalNoPossibility(GUIMonsterIcon icon) { icon.DimmMess = StringMaster.GetString("MedalInherit_NoPossibility"); icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SetTouchAct_S(this.blockStateAction.onTouch); icon.SetTouchAct_L(this.blockStateAction.onPress); }
private GameObject SetSelectedCharChg(MonsterData md, GameObject goEmpty, GameObject goIcon, int inum) { if (md != null) { if (goIcon != null) { UnityEngine.Object.DestroyImmediate(goIcon); } GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(md, goEmpty.transform.localScale, goEmpty.transform.localPosition, goEmpty.transform.parent, true, false); goIcon = guimonsterIcon.gameObject; goIcon.SetActive(true); guimonsterIcon.Data = md; if (inum == 0) { guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconShort_0)); this.SetBaseTouchAct_L(guimonsterIcon); } else if (inum == 1) { guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconShort_1)); this.SetPartnerTouchAct_L(guimonsterIcon); } UIWidget component = goEmpty.GetComponent <UIWidget>(); UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>(); if (component != null && component2 != null) { int add = component.depth - component2.depth; DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>(); component3.AddWidgetDepth(guimonsterIcon.transform, add); } goEmpty.SetActive(false); } return(goIcon); }
public void SetEvolutionIcon(GUIMonsterIcon icon, bool canEvolve, bool onlyGrayOut) { icon.SetMessageLevel(); if (canEvolve) { if (!onlyGrayOut) { icon.SortMess = StringMaster.GetString("CharaIcon-01"); icon.SetSortMessageColor(ConstValue.DIGIMON_YELLOW); } else { icon.SetSortMessageColor(ConstValue.DIGIMON_GREEN); } } else { icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE); if (!onlyGrayOut) { icon.SortMess = StringMaster.GetString("CharaIcon-02"); icon.SetSortMessageColor(ConstValue.DIGIMON_BLUE); } else { icon.SetSortMessageColor(ConstValue.DIGIMON_GREEN); } } }
private void UpdateIcons() { for (int i = 0; i < this.partObjs.Count; i++) { GUIMonsterIcon guimonsterIcon = (GUIMonsterIcon)this.partObjs[i]; if (guimonsterIcon.gameObject.activeSelf) { if (guimonsterIcon.SortMess != string.Empty && guimonsterIcon.LevelMess != string.Empty) { if (this.valueA > 0f) { guimonsterIcon.LevelMessAlpha(this.valueA); guimonsterIcon.SortMessAlpha(0f); } else { guimonsterIcon.LevelMessAlpha(0f); guimonsterIcon.SortMessAlpha(-this.valueA); } } else { guimonsterIcon.LevelMessAlpha(1f); guimonsterIcon.SortMessAlpha(1f); } } } }
private void ActMIconLong(MonsterData tappedMonsterData) { bool flag = this.CheckPartnerMonster(tappedMonsterData); CMD_CharacterDetailed.DataChg = tappedMonsterData; CMD_CharacterDetailed cmd_CharacterDetailed = GUIMain.ShowCommonDialog(delegate(int i) { if (tappedMonsterData == this.baseDigimon) { this.leftLargeMonsterIcon.Lock = tappedMonsterData.userMonster.IsLocked; } GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(tappedMonsterData); if (null != icon) { icon.Lock = tappedMonsterData.userMonster.IsLocked; if (!MonsterStatusData.IsSpecialTrainingType(tappedMonsterData.GetMonsterMaster().Group.monsterType) && this.IsPartnerCandidateMonster(tappedMonsterData)) { this.iconGrayOut.SetLockReturnDetailed(icon, tappedMonsterData.userMonster.IsLocked); } } }, "CMD_CharacterDetailed", null) as CMD_CharacterDetailed; if (flag) { cmd_CharacterDetailed.Mode = CMD_CharacterDetailed.LockMode.Succession; } }
public void SetGrayOutIconPartyUsed(MonsterData ignoreMonster) { for (int i = 0; i < this.deckMonster.Count; i++) { if (this.deckMonster[i] != ignoreMonster) { GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.deckMonster[i]); if (null != icon) { this.iconGrayOut.BlockPartyUsed(icon); } } } for (int j = 0; j < this.colosseumDeckMonster.Count; j++) { if (this.colosseumDeckMonster[j] != ignoreMonster) { GUIMonsterIcon icon2 = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.colosseumDeckMonster[j]); if (null != icon2) { this.iconGrayOut.BlockPartyUsed(icon2); } } } }
public void SetSelect(GUIMonsterIcon icon) { icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SelectNum = 0; icon.SetTouchAct_S(this.selectedStateAction.onTouch); icon.SetTouchAct_L(this.selectedStateAction.onPress); }
public void SetIconGrayOutUserMonsterList(MonsterData baseMonster) { List <MonsterData> monsterDataList = MonsterDataMng.Instance().GetMonsterDataList(); for (int i = 0; i < monsterDataList.Count; i++) { if (this.IsNotSelectedMonster(baseMonster, monsterDataList[i])) { GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(monsterDataList[i]); if (baseMonster == null) { this.iconGrayOut.ResetState(icon); } else if (monsterDataList[i].userMonster.IsLocked || MonsterStatusData.IsSpecialTrainingType(monsterDataList[i].GetMonsterMaster().Group.monsterType)) { this.iconGrayOut.BlockLockIcon(icon); } else { this.iconGrayOut.CancelLockIcon(icon); } } } }
public void CancelSelect(GUIMonsterIcon icon) { icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE); icon.SelectNum = -1; icon.SetTouchAct_S(this.normalStateAction.onTouch); icon.SetTouchAct_L(this.normalStateAction.onPress); }
public void SetVersionUpIcon(GUIMonsterIcon icon, bool canVersionUp, bool onlyGrayOut) { icon.SetMessageLevel(); if (canVersionUp) { icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE); if (!onlyGrayOut) { icon.SortMess = StringMaster.GetString("CharaIcon-05"); icon.SetSortMessageColor(ConstValue.DIGIMON_YELLOW); } else { icon.SetSortMessageColor(ConstValue.DIGIMON_GREEN); } } else { icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE); if (!onlyGrayOut) { icon.SortMess = StringMaster.GetString("CharaIcon-06"); icon.SetSortMessageColor(ConstValue.DIGIMON_BLUE); } else { icon.SetSortMessageColor(ConstValue.DIGIMON_GREEN); } } icon.SetTouchAct_S(this.normalStateAction.onTouch); icon.SetTouchAct_L(this.normalStateAction.onPress); }
public void ResetState(GUIMonsterIcon icon) { icon.DimmMess = string.Empty; icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE); icon.SetTouchAct_S(this.normalStateAction.onTouch); icon.SetTouchAct_L(this.normalStateAction.onPress); }
public void SetSelectText(GUIMonsterIcon icon, string iconText) { icon.DimmMess = iconText; icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE); icon.SetTouchAct_S(this.selectedStateAction.onTouch); icon.SetTouchAct_L(this.selectedStateAction.onPress); }
public void CancelLockIconReturnDetailed(GUIMonsterIcon icon) { icon.DimmMess = string.Empty; icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE); icon.SetTouchAct_S(this.normalStateAction.onTouch); icon.SetTouchAct_L(this.normalStateAction.onPress); }
protected void SetIcons(string path, List <UISprite> list, GameWebAPI.RespDataCM_LoginBonus.LoginReward[] rewardList) { int num = 1; string name = path + num; if (base.transform.Find(name) == null) { return; } UISprite component = base.transform.Find(name).GetComponent <UISprite>(); while (component != null) { list.Add(component); if (rewardList.Length < num) { component.gameObject.SetActive(false); } else { int num2 = num - 1; string rewardIcon = this.GetRewardIcon(rewardList[num2]); string assetCategoryId = rewardList[num2].assetCategoryId; string assetValue = rewardList[num2].assetValue; if (string.IsNullOrEmpty(assetCategoryId) || string.IsNullOrEmpty(rewardIcon) || this.textureCategoryList.Contains(assetCategoryId.ToInt32())) { component.gameObject.SetActive(false); } else if (assetCategoryId.ToInt32() == 17) { GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(assetValue); ChipDataMng.MakePrefabByChipData(chipMainData, component.gameObject, component.transform.localPosition, component.transform.localScale, null, -1, -1, true); } else if (assetCategoryId.ToInt32() == 1) { this.monsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(MonsterDataMng.Instance().CreateMonsterDataByMID(assetValue), Vector3.one, Vector3.zero, component.transform, true, false); this.monsterIcon.ResizeIcon(component.width, component.height); if (null != this.monsterIcon) { DepthController depthController = this.monsterIcon.GetDepthController(); if (null != depthController) { depthController.AddWidgetDepth(this.monsterIcon.transform, component.depth + 1); } } } else { component.spriteName = rewardIcon; } } num++; name = path + num; if (!(base.transform.Find(name) != null)) { break; } component = base.transform.Find(name).GetComponent <UISprite>(); } }