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(); }
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 SetIconDungeonBonus(QuestBonusPack bonus, QuestBonusTargetCheck checker) { QuestBonusPack questBonusPack = new QuestBonusPack(); for (int i = 0; i < this.partObjs.Count; i++) { GUIMonsterIcon guimonsterIcon = this.partObjs[i] as GUIMonsterIcon; if (null != guimonsterIcon) { MonsterData data = guimonsterIcon.Data; questBonusPack.bonusChipIds = QuestBonusFilter.GetActivateBonusChips(data, bonus.bonusChipIds); questBonusPack.eventBonuses = QuestBonusFilter.GetActivateEventBonuses(checker, data, bonus.eventBonuses); questBonusPack.dungeonBonuses = QuestBonusFilter.GetActivateDungeonBonuses(checker, data, bonus.dungeonBonuses); guimonsterIcon.Gimmick = questBonusPack.ExistBonus(); } } }