Example #1
0
 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 SetLockReturnDetailed(GUIMonsterIcon icon, bool isLock)
 {
     if (isLock)
     {
         icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE);
         icon.SetTouchAct_S(this.blockStateAction.onTouch);
         icon.SetTouchAct_L(this.blockStateAction.onPress);
     }
     else
     {
         icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE);
         icon.SetTouchAct_S(this.normalStateAction.onTouch);
         icon.SetTouchAct_L(this.normalStateAction.onPress);
     }
 }
Example #3
0
    private void ShowParam()
    {
        this.md_favo = MonsterDataMng.Instance().CreateMonsterDataByMID(CMD_PartsFriendCheckScreen.data.monsterData.monsterId);
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.md_favo, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, false);

        this.goMN_ICON_2 = guimonsterIcon.gameObject;
        this.goMN_ICON_2.SetActive(true);
        guimonsterIcon.Data = this.md_favo;
        guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actMIconLong));
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.actMIconLong));
        UIWidget component  = this.goMN_ICON.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.SetActive(false);
        TitleDataMng.SetTitleIcon(CMD_PartsFriendCheckScreen.data.userData.titleId, this.goTITLE_ICON.GetComponent <UITexture>());
        this.ngTX_NICKNAME.text   = CMD_PartsFriendCheckScreen.data.userData.nickname;
        this.ngTX_EXP.text        = CMD_PartsFriendCheckScreen.data.userData.description;
        this.ngTX_LAST_LOGIN.text = StringMaster.GetString("Friend-12") + CMD_PartsFriendCheckScreen.data.userData.loginTime;
    }
Example #4
0
 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);
 }
Example #5
0
 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);
 }
Example #6
0
 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);
 }
Example #7
0
 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);
 }
Example #8
0
 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);
 }
Example #9
0
 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);
 }
Example #10
0
 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);
 }
Example #11
0
 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);
 }
        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();
        }
Example #13
0
 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 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();
 }
Example #15
0
 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);
 }
Example #16
0
 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);
 }
Example #17
0
 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 ShowInfo()
    {
        GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dungeon = this.dungeonData.dungeon;
        ClassSingleton <PartyBossIconsAccessor> .Instance.StageEnemies = dungeon.encountEnemies;
        this.ngTX_A_STAGE_DNG_NUMBER.text   = this.dungeonNo;
        this.ngTX_A_STAGE_DNG_TITLE.text    = this.dungeonData.worldDungeonM.name;
        this.ngTX_A_STAGE_DNG_DESCRIPT.text = this.dungeonData.worldDungeonM.description;
        this.getEXPLabel.text     = dungeon.exp.ToString();
        this.getClusterLabel.text = StringFormat.Cluster(dungeon.money);
        int num = 0;
        int i;

        for (i = 0; i < dungeon.encountEnemies.Length; i++)
        {
            if (num >= this.goENCOUNT_MONS_LIST.Count)
            {
                break;
            }
            GameWebAPI.RespDataWD_GetDungeonInfo.EncountEnemy encountEnemy = dungeon.encountEnemies[i];
            if (encountEnemy.type == 2 || encountEnemy.type == 4)
            {
                string text = encountEnemy.monsterId.ToString();
                if (!string.IsNullOrEmpty(text))
                {
                    MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(text);
                    if (monsterData != null)
                    {
                        GUIMonsterIcon  guimonsterIcon  = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, this.goENCOUNT_MONS_LIST[num].transform.parent, true, false);
                        DepthController depthController = guimonsterIcon.GetDepthController();
                        depthController.AddWidgetDepth(guimonsterIcon.transform, 40);
                        guimonsterIcon.SetTouchAct_S(delegate(MonsterData tappedMonsterData)
                        {
                            this.ActCallBackEncMons(tappedMonsterData, encountEnemy.resistanceId);
                        });
                        this.goENCOUNT_MONS_LIST[num].SetActive(false);
                        num++;
                    }
                }
            }
        }
        if (this.dungeonData.dungeon.isExtraWave == 1 && num < this.goENCOUNT_MONS_LIST.Count)
        {
            GUIMonsterIcon guimonsterIcon2 = GUIMonsterIcon.MakeQuestionPrefab(this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, (int)(this.goENCOUNT_MONS_LIST[num].transform.localPosition.z + 35f), this.goENCOUNT_MONS_LIST[num].transform.parent);
            guimonsterIcon2.SetTouchAct_S(null);
            guimonsterIcon2.SetTouchAct_L(null);
        }
        while (i < this.goENCOUNT_MONS_LIST.Count)
        {
            this.goENCOUNT_MONS_LIST[i].SetActive(false);
            i++;
        }
        this.ShowDropItems();
        this.goContentsROOT.SetActive(true);
        this.goPointContentsROOT.SetActive(true);
        this.bonusPointUI.Initialize(this.areaId, this.dungeonData.worldDungeonM.worldStageId, this.dungeonData.worldDungeonM.worldDungeonId);
        this.bonusPointUI.SetBonusUI();
    }
    private void ShowDropItems()
    {
        GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dungeon = this.dungeonData.dungeon;
        this.dropAssetList = new List <GameWebAPI.RespDataWD_GetDungeonInfo.DropAsset>();
        QuestData.CreateDropAssetList(dungeon, this.dropAssetList);
        int num = 0;

        for (int i = 0; i < this.dropAssetList.Count; i++)
        {
            if (i >= this.itemDROP_ITEM_LIST.Count)
            {
                break;
            }
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.goTEX_DROP);
            Transform  transform  = gameObject.transform;
            Transform  transform2 = this.itemDROP_ITEM_LIST[i].transform;
            transform.parent        = transform2.parent;
            transform.localScale    = transform2.transform.localScale;
            transform.localPosition = transform2.localPosition;
            int         index     = i;
            GUICollider component = gameObject.GetComponent <GUICollider>();
            component.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
            {
                this.ActCallBackDropItem(index);
            };
            UIWidget component2 = this.itemDROP_ITEM_LIST[i].GetComponent <UIWidget>();
            UIWidget component3 = gameObject.GetComponent <UIWidget>();
            component3.depth = component2.depth;
            string assetCategoryId = this.dropAssetList[i].assetCategoryId.ToString();
            string objectId        = this.dropAssetList[i].assetValue.ToString();
            this.itemDROP_ITEM_LIST[i].SetItem(assetCategoryId, objectId, "1", true, null);
            BoxCollider[] componentsInChildren = this.itemDROP_ITEM_LIST[i].GetComponentsInChildren <BoxCollider>();
            if (componentsInChildren != null)
            {
                foreach (BoxCollider boxCollider in componentsInChildren)
                {
                    boxCollider.enabled = false;
                }
            }
            num++;
        }
        if (this.dungeonData.dungeon.isExtraWave == 1 && num < this.itemDROP_ITEM_LIST.Count)
        {
            GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakeQuestionPrefab(new Vector3(0.46f, 0.46f, 1f), this.itemDROP_ITEM_LIST[num].transform.localPosition, (int)(this.itemDROP_ITEM_LIST[num].transform.localPosition.z + 35f), this.itemDROP_ITEM_LIST[num].transform.parent);
            guimonsterIcon.SetTouchAct_S(null);
            guimonsterIcon.SetTouchAct_L(null);
        }
        this.goTEX_DROP.SetActive(false);
    }
Example #20
0
 private void ShowMonsterIcons()
 {
     for (int i = 0; i < this.goMN_ICON_LIST.Count; i++)
     {
         if (CMD_MonsterGashaResult.DataList.Count > i)
         {
             Transform      transform      = this.goMN_ICON_LIST[i].transform;
             GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(CMD_MonsterGashaResult.DataList[i], transform.localScale, transform.localPosition, transform.parent, true, false);
             guimonsterIcon.New = CMD_MonsterGashaResult.IconNewFlagList[i];
             this.monsterIconList.Add(guimonsterIcon);
             guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconLong));
             guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
             UIWidget component = guimonsterIcon.gameObject.GetComponent <UIWidget>();
             if (null != this.prizeEfcDirector && null != this.prizeEfcCont)
             {
                 this.prizeEfcCont.gameObject.SetActive(true);
                 GameObject   gameObject = UnityEngine.Object.Instantiate <GameObject>(this.prizeEfcCont.gameObject);
                 PrizeEfcCont component2 = gameObject.GetComponent <PrizeEfcCont>();
                 component2.prizeEfcDir             = this.prizeEfcDirector;
                 component2.transform.parent        = guimonsterIcon.transform;
                 component2.transform.localPosition = Vector3.zero;
                 component2.transform.localScale    = Vector3.one;
                 component2.Data = CMD_MonsterGashaResult.DataList[i];
                 component2.SetParam();
                 UIWidget component3 = component2.gameObject.GetComponent <UIWidget>();
                 if (null != component3 && null != component)
                 {
                     int             add        = component.depth - component3.depth;
                     DepthController component4 = component2.gameObject.GetComponent <DepthController>();
                     component4.AddWidgetDepth(component4.transform, add);
                 }
             }
             UIWidget component5 = this.goMN_ICON_LIST[i].GetComponent <UIWidget>();
             if (null != component5 && null != component)
             {
                 int             add2       = component5.depth - component.depth;
                 DepthController component6 = guimonsterIcon.gameObject.GetComponent <DepthController>();
                 component6.AddWidgetDepth(guimonsterIcon.transform, add2);
             }
             this.goMN_ICON_LIST[i].SetActive(false);
         }
         else
         {
             this.goMN_ICON_LIST[i].SetActive(false);
         }
     }
 }
    private void actRemoveChg(MonsterData md)
    {
        if (this.DataChg != null)
        {
            GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.DataChg);

            icon.DimmMess = string.Empty;
            icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE);
            icon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconShort));
        }
        this.DataChg = null;
        if (null != this.goMN_ICON_CHG_2)
        {
            UnityEngine.Object.DestroyImmediate(this.goMN_ICON_CHG_2);
        }
        this.goMN_ICON_CHG.SetActive(true);
        this.ShowChgInfo();
        this.SelectButtonActive(false);
    }
Example #22
0
    private GUIMonsterIcon ShowCreateIcon(MonsterData md, GameObject goEmpty)
    {
        Transform      transform      = goEmpty.transform;
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(md, transform.localScale, transform.localPosition, transform.parent, true, false);

        guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconS_Remove));
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
        guimonsterIcon.transform.localScale = new Vector3(0.84f, 0.84f, 1f);
        UIWidget component  = goEmpty.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);
        }
        goEmpty.SetActive(false);
        return(guimonsterIcon);
    }
Example #23
0
 public void SetIconSortieLimitParts(List <GameWebAPI.RespDataMA_WorldDungeonSortieLimit.WorldDungeonSortieLimit> limitList)
 {
     if (limitList == null || limitList.Count == 0)
     {
         return;
     }
     for (int i = 0; i < this.partObjs.Count; i++)
     {
         GUIMonsterIcon guimonsterIcon = this.partObjs[i] as GUIMonsterIcon;
         if (null != guimonsterIcon)
         {
             MonsterData data = guimonsterIcon.Data;
             if (data != null && !ClassSingleton <QuestData> .Instance.CheckSortieLimit(limitList, data.monsterMG.tribe, data.monsterMG.growStep))
             {
                 guimonsterIcon.SetCenterText(StringMaster.GetString("PartySortieLimitNG"), GUIMonsterIcon.DimmMessColorType.SORTIE_LIMIT);
                 guimonsterIcon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE);
                 guimonsterIcon.SetTouchAct_S(null);
             }
         }
     }
 }
    private void ActMIconShort(MonsterData tappedMonsterData)
    {
        if (this.DataChg != null)
        {
            GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.DataChg);

            icon.DimmMess = string.Empty;
            icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE);
            icon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconShort));
        }
        this.DataChg = tappedMonsterData;
        if (this.DataChg != null)
        {
            GUIMonsterIcon icon2 = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.DataChg);

            icon2.DimmMess = StringMaster.GetString("SystemSelect");
            icon2.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE);
            icon2.SetTouchAct_S(null);
            this.SetSelectedCharChg();
            this.SelectButtonActive(true);
        }
    }
 private void UpdateMonsterIcon()
 {
     if (!this.isUpdateMIcon && this.data != null)
     {
         this.md_favo = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.monsterData.monsterId);
         GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.md_favo, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, true);
         this.goMN_ICON_2 = guimonsterIcon.gameObject;
         this.goMN_ICON_2.SetActive(true);
         guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actMIconLong));
         guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.actMIconLong));
         UIWidget component  = this.goMN_ICON.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.SetActive(false);
         this.isUpdateMIcon = true;
     }
 }
Example #26
0
 private void SetUserInfo(MultiBattleData.PvPUserData userData, PvPVersusInfo6Icon.UserDataUI ui)
 {
     ui.name.text = userData.userStatus.nickname;
     TitleDataMng.SetTitleIcon(userData.userStatus.titleId, ui.title);
     ui.rank.spriteName = MultiTools.GetPvPRankSpriteName(userData.userStatus.colosseumRankId);
     ui.koTitle.text    = StringMaster.GetString("ColosseumScoreTitle");
     ui.koValue.text    = string.Format(StringMaster.GetString("ColosseumScore"), userData.userStatus.winTotal, userData.userStatus.loseTotal);
     ui.dpTitle.text    = StringMaster.GetString("ColosseumDuelPoint");
     ui.dpValue.text    = userData.userStatus.score.ToString();
     for (int i = 0; i < userData.monsterData.Length; i++)
     {
         GUIMonsterIcon guimonsterIcon = ui.icons[i];
         if (ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userData.monsterData[i].userMonsterId) != null)
         {
             guimonsterIcon.Data = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userData.monsterData[i].userMonsterId);
         }
         else
         {
             guimonsterIcon.Data = userData.monsterData[i].ToMonsterData();
         }
         guimonsterIcon.SetTouchAct_L(null);
         guimonsterIcon.SetTouchAct_S(null);
     }
 }
Example #27
0
 public void SelectIcon(GUIMonsterIcon icon)
 {
     icon.SetTouchAct_S(this.selectedStateAction.onTouch);
     icon.SetTouchAct_L(this.selectedStateAction.onPress);
 }
Example #28
0
    public void AllBuild(List <MonsterData> monsterDataList, Vector3 vScl, Action <MonsterData> actL = null, Action <MonsterData> actS = null, bool rebuild = false)
    {
        if (!rebuild)
        {
            this.actL_bak = actL;
            this.actS_bak = actS;
            foreach (MonsterData monsterData in monsterDataList)
            {
                GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(monsterData);

                icon.SetTouchAct_S(null);
            }
        }
        ClassSingleton <GUIMonsterIconList> .Instance.PushBackAllMonsterPrefab();

        base.InitScrollBar();
        base.SetSelectPanelParam();
        this.partsCount = monsterDataList.Count;
        this.partObjs   = new List <GUIListPartBS>();
        this.vScl_bak   = vScl;
        if (this.partsCount == 0)
        {
            base.height = 0f;
            base.InitMinMaxLocation(-1, 0f);
            return;
        }
        GUIMonsterIcon icon2 = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(monsterDataList[0]);

        int num = this.partsCount / this.PARTS_CT_MN;

        if (this.partsCount % this.PARTS_CT_MN > 0)
        {
            num++;
        }
        base.selectParts = icon2.gameObject;
        GUISelectPanelBSPartsUD.PanelBuildData panelBuildData = base.CalcBuildData(this.PARTS_CT_MN, num, vScl.x, vScl.y);
        float    num2      = panelBuildData.startY;
        float    startX    = panelBuildData.startX;
        int      num3      = 0;
        UIWidget component = base.gameObject.GetComponent <UIWidget>();

        foreach (MonsterData monsterData2 in monsterDataList)
        {
            GUIMonsterIcon icon3 = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(monsterData2);

            GameObject gameObject = icon3.gameObject;
            this.partObjs.Add(icon3);
            gameObject.SetActive(true);
            vScl.z = 1f;
            gameObject.transform.parent     = base.transform;
            gameObject.transform.localScale = vScl;
            float x = startX + panelBuildData.pitchW * (float)(num3 % this.PARTS_CT_MN);
            icon3.SetOriginalPos(new Vector3(x, num2, -5f));
            icon3.SetParent();
            if (component != null)
            {
                DepthController component2 = gameObject.GetComponent <DepthController>();
                UIWidget        component3 = gameObject.GetComponent <UIWidget>();
                if (component2 != null && component3 != null)
                {
                    component2.AddWidgetDepth(gameObject.transform, component.depth + 10 - component3.depth);
                }
            }
            icon3.SetTouchAct_L(actL);
            if (!rebuild || icon3.GetTouchAct_S() == null)
            {
                if (this.IsEnablePush(monsterData2))
                {
                    icon3.SetTouchAct_S(actS);
                }
                else
                {
                    icon3.SetTouchAct_S(null);
                }
            }
            num3++;
            if (num3 % this.PARTS_CT_MN == 0)
            {
                num2 -= panelBuildData.pitchH;
            }
        }
        base.height = panelBuildData.lenH;
        base.InitMinMaxLocation(-1, 0f);
        base.UpdateActive();
    }
Example #29
0
 public void BlockLevelMax(GUIMonsterIcon icon)
 {
     icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE);
     icon.SetTouchAct_S(this.blockStateAction.onTouch);
     icon.SetTouchAct_L(this.blockStateAction.onPress);
 }