Ejemplo n.º 1
0
    public static void AddWidgetDepth_Static(Transform tm, int add)
    {
        UIWidget component = tm.gameObject.GetComponent <UIWidget>();

        if (component != null)
        {
            component.depth += add;
        }
        IEnumerator enumerator = tm.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object    obj = enumerator.Current;
                Transform tm2 = (Transform)obj;
                DepthController.AddWidgetDepth_Static(tm2, add);
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
    }
Ejemplo n.º 2
0
    public static void RefreshWidgetDrawCall(Transform tm)
    {
        UIWidget component = tm.gameObject.GetComponent <UIWidget>();

        if (component != null)
        {
            component.SetDirty();
        }
        IEnumerator enumerator = tm.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object    obj = enumerator.Current;
                Transform tm2 = (Transform)obj;
                DepthController.RefreshWidgetDrawCall(tm2);
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
    }
Ejemplo n.º 3
0
    private void SetCommonUI_A_Stage()
    {
        this.goSelectPanelA_StageL = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelA_StageL", base.gameObject);
        this.csSelectPanelA_StageL = this.goSelectPanelA_StageL.GetComponent <GUISelectPanelA_StageL>();
        int depth = this.txEVENT_BG.gameObject.GetComponent <UIWidget>().depth - 1;

        DepthController.SetWidgetDepth_Static(this.csSelectPanelA_StageL.transform, depth);
        if (CMD_QuestTOP.AreaData.data.type == "3" || CMD_QuestTOP.AreaData.data.type == "4")
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("UISelectPanelParam/SelectPanelParamUD_A_StageL_Point")) as GameObject;
            gameObject.transform.parent = base.transform;
            this.csSelectPanelA_StageL.SetSelectPanelParam(gameObject);
        }
        else if (CMD_QuestTOP.AreaData.data.worldAreaId == "3" && this.isScheduleBannerActive)
        {
            GameObject gameObject2 = UnityEngine.Object.Instantiate(Resources.Load("UISelectPanelParam/SelectPanelParamUD_A_StageL_Point")) as GameObject;
            gameObject2.transform.parent = base.transform;
            this.csSelectPanelA_StageL.SetSelectPanelParam(gameObject2);
        }
        else if (CMD_QuestTOP.AreaData.data.type == "6")
        {
            GameObject gameObject3 = UnityEngine.Object.Instantiate(Resources.Load("UISelectPanelParam/SelectPanelParamUD_A_StageL_Detiles")) as GameObject;
            gameObject3.transform.parent = base.transform;
            this.csSelectPanelA_StageL.SetSelectPanelParam(gameObject3);
        }
        Vector3     localPosition = this.goLP_SATGE.transform.localPosition;
        GUICollider component     = this.goSelectPanelA_StageL.GetComponent <GUICollider>();

        component.SetOriginalPos(localPosition);
        this.csSelectPanelA_StageL.selectParts        = this.goLP_SATGE;
        this.csSelectPanelA_StageL.ListWindowViewRect = this.GetRectWindowArea(localPosition);
    }
Ejemplo n.º 4
0
 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);
         }
     }
 }
        public UI_PictureDetailedInfo LoadUI(int skillCount)
        {
            string path = string.Empty;

            if (skillCount == 1)
            {
                path = "UI/Picturebook/OneSkillStatus";
            }
            else
            {
                path = "UI/Picturebook/TwoSkillStatus";
            }
            GameObject original   = AssetDataMng.Instance().LoadObject(path, null, true) as GameObject;
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(original);
            Transform  transform  = gameObject.transform;

            transform.parent        = this.viewParentObject;
            transform.localPosition = Vector3.zero;
            transform.localRotation = Quaternion.identity;
            transform.localScale    = Vector3.one;
            transform.name          = "DetailedInfo";
            UIWidget component = this.viewParentObject.GetComponent <UIWidget>();

            DepthController.AddWidgetDepth_Static(transform, component.depth);
            return(gameObject.GetComponent <UI_PictureDetailedInfo>());
        }
        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();
        }
 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;
     }
 }
Ejemplo n.º 8
0
 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();
 }
Ejemplo n.º 9
0
    private void SetZPos(CommonDialog cd)
    {
        DepthController component = base.gameObject.GetComponent <DepthController>();

        if (null != cd)
        {
            CMD component2 = cd.gameObject.GetComponent <CMD>();
            if (null != component2 && (null != component2.PartsTitle || component2.requestMenu))
            {
                float   dlgpitch      = GUIManager.GetDLGPitch();
                float   z             = cd.gameObject.transform.localPosition.z;
                float   z2            = base.gameObject.transform.localPosition.z;
                float   num           = z + dlgpitch / 2f;
                int     add           = (int)(-(int)num) - (int)(-(int)z2);
                Vector3 localPosition = base.gameObject.transform.localPosition;
                localPosition.z = num;
                base.gameObject.transform.localPosition = localPosition;
                component.AddWidgetDepth(base.transform, add);
            }
        }
        else
        {
            float   z3             = base.gameObject.transform.localPosition.z;
            int     add2           = (int)(-(int)this.orgPosZ) - (int)(-(int)z3);
            Vector3 localPosition2 = base.gameObject.transform.localPosition;
            localPosition2.z = this.orgPosZ;
            base.gameObject.transform.localPosition = localPosition2;
            component.AddWidgetDepth(base.transform, add2);
        }
    }
Ejemplo n.º 10
0
 private void SetDigimonIcon()
 {
     if (this.data.leaderMonsterId == "0")
     {
         this.data.leaderMonsterId = "81";
     }
     if (string.IsNullOrEmpty(this.data.leaderMonsterId))
     {
         this.goMONSTER_ICON.SetActive(false);
         return;
     }
     if (this.digimonData == null)
     {
         this.digimonData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.leaderMonsterId);
         this.csMonsIcon  = GUIMonsterIcon.MakePrefabByMonsterData(this.digimonData, this.goMONSTER_ICON.transform.localScale, this.goMONSTER_ICON.transform.localPosition, this.goMONSTER_ICON.transform.parent, true, true);
         UIWidget component  = this.goMONSTER_ICON.GetComponent <UIWidget>();
         UIWidget component2 = this.csMonsIcon.gameObject.GetComponent <UIWidget>();
         if (component != null && component2 != null)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = this.csMonsIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(this.csMonsIcon.transform, add);
         }
         this.goMONSTER_ICON.SetActive(false);
     }
     else
     {
         this.digimonData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.leaderMonsterId);
         this.csMonsIcon.RefreshPrefabByMonsterData(this.digimonData);
     }
 }
    private void ShowIcon()
    {
        if (this.goMN_ICON_CHG_2 != null)
        {
            UnityEngine.Object.DestroyImmediate(this.goMN_ICON_CHG_2);
        }
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.data, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, false);

        this.goMN_ICON_CHG_2 = guimonsterIcon.gameObject;
        this.goMN_ICON_CHG_2.SetActive(true);
        guimonsterIcon.Data = this.data;
        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);
        }
        BoxCollider component4 = this.goMN_ICON.GetComponent <BoxCollider>();
        BoxCollider component5 = guimonsterIcon.GetComponent <BoxCollider>();

        if (component4 != null && component5 != null)
        {
            component5.center = component4.center;
            component5.size   = component4.size;
        }
        this.goMN_ICON.SetActive(false);
    }
Ejemplo n.º 12
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;
    }
Ejemplo n.º 13
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);
 }
Ejemplo n.º 14
0
    public void ResetDepthToOriginal()
    {
        DepthController component  = this.goBASE.GetComponent <DepthController>();
        UIWidget        component2 = this.goBASE.GetComponent <UIWidget>();

        component.AddWidgetDepth(base.transform, this.originalDepth - component2.depth);
    }
Ejemplo n.º 15
0
    public static void MakePrefabByChipData(GameWebAPI.RespDataMA_ChipM.Chip masterChip, GameObject emptyObject, Vector3 position, Vector3 scale, Action <ChipIcon> actCB = null, int texSizeWidth = -1, int texSizeHeight = -1, bool colliderEnable = true)
    {
        Action <UnityEngine.Object> actEnd = delegate(UnityEngine.Object obj)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(obj) as GameObject;
            gameObject.transform.SetParent(emptyObject.transform.parent);
            gameObject.transform.localPosition = position;
            gameObject.transform.localScale    = scale;
            BoxCollider component = gameObject.GetComponent <BoxCollider>();
            if (component != null)
            {
                component.enabled = colliderEnable;
            }
            UIWidget        component2 = emptyObject.GetComponent <UIWidget>();
            DepthController component3 = gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(component2.depth);
            ChipIcon component4 = gameObject.GetComponent <ChipIcon>();
            component4.SetData(masterChip, texSizeWidth, texSizeHeight);
            if (actCB != null)
            {
                actCB(component4);
            }
        };

        AssetDataMng.Instance().LoadObjectASync("UICommon/ListParts/ListPartsChip", actEnd);
    }
Ejemplo n.º 16
0
 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();
     }
 }
Ejemplo n.º 17
0
    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>();
        }
    }
Ejemplo n.º 18
0
 protected override void WindowOpened()
 {
     base.WindowOpened();
     if (this.useCMDAnim)
     {
         DepthController.RefreshWidgetDrawCall(base.transform);
     }
 }
    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();
    }
Ejemplo n.º 20
0
    public static void SetWidgetDepth_Static(Transform tm, int depth)
    {
        UIWidget component = tm.gameObject.GetComponent <UIWidget>();

        if (component != null)
        {
            int add = depth - component.depth;
            DepthController.AddWidgetDepth_Static(tm, add);
        }
    }
Ejemplo n.º 21
0
        public void Initialize(Transform parentObject, int iconSize, int depthOffset)
        {
            Transform transform = this.iconRootTransform;

            transform.parent        = parentObject;
            transform.localScale    = Vector3.one;
            transform.localPosition = Vector3.zero;
            MonsterIconTransform.SetSize(this.iconRootTransform, iconSize);
            DepthController.AddWidgetDepth_Static(transform, depthOffset);
            this.Thumbnail.Initialize();
        }
Ejemplo n.º 22
0
    private void SetInitLabel()
    {
        this.lbUserName.text = this.data.ownerName;
        this.lbComment.text  = this.data.introduction;
        TitleDataMng.SetTitleIcon(this.data.titleId, this.goTitleIcon.GetComponent <UITexture>());
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[] worldStageM  = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM   worldStageM2 = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == this.data.worldStageId);
        this.lbQuestName.text = worldStageM2.name + "\n" + this.data.dungeonName;
        string moodType = this.data.moodType;

        if (moodType != null)
        {
            if (moodType == "1")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-06");
                goto IL_125;
            }
            if (moodType == "2")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-07");
                goto IL_125;
            }
            if (!(moodType == "3"))
            {
            }
        }
        this.lbMoodType.text = StringMaster.GetString("RecruitRule-08");
IL_125:
        this.lbNowMemberNum.text = string.Format(StringMaster.GetString("SystemFraction"), this.data.memberCount, 3);
        if (!this.isOpenedQuest)
        {
            this.bgFrame.color     = ConstValue.DEFAULT_COLOR;
            this.lbUserName.color  = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbQuestName.color = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbComment.color   = ConstValue.DEACTIVE_BUTTON_LABEL;
        }
        if (this.data.ownerMonsterId != null)
        {
            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.ownerMonsterId);
            if (monsterData != null)
            {
                GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false);
                UIWidget       component      = base.gameObject.GetComponent <UIWidget>();
                if (component != null)
                {
                    DepthController depthController = guimonsterIcon.GetDepthController();
                    depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2);
                }
            }
        }
    }
Ejemplo n.º 23
0
    public static GUIMonsterIcon MakeQuestionPrefab(Vector3 vScl, Vector3 vPos, int depth, Transform parent)
    {
        GameObject gameObject = GUIManager.LoadCommonGUI("ListParts/ListPartsThumbnail", null);

        gameObject.SetActive(true);
        GUIMonsterIcon component = gameObject.GetComponent <GUIMonsterIcon>();

        component.transform.parent        = parent;
        component.transform.localScale    = vScl;
        component.transform.localPosition = vPos;
        DepthController.SetWidgetDepth_Static(component.transform, depth);
        component.SetQuestionIcon();
        return(component);
    }
Ejemplo n.º 24
0
    private void SetInitLabel()
    {
        this.lbUserName.text    = this.friendData.userData.nickname;
        this.lbUserComment.text = this.friendData.userData.description;
        this.lbLastLogin.text   = this.friendData.userData.loginTime;
        TitleDataMng.SetTitleIcon(this.friendData.userData.titleId, this.goTitleIcon.GetComponent <UITexture>());
        MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.friendData.monsterData.monsterId);

        if (monsterData != null)
        {
            GUIMonsterIcon  guimonsterIcon  = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMonsterIcon.transform.localScale, this.goMonsterIcon.transform.localPosition, this.goMonsterIcon.transform.parent, true, false);
            DepthController depthController = guimonsterIcon.GetDepthController();
            depthController.AddWidgetDepth(guimonsterIcon.transform, 1800);
        }
    }
Ejemplo n.º 25
0
    // Start is called before the first frame update
    void Start()
    {
        dc            = Hub.Get <DepthController>();
        movementSpeed = movementSpeed + Random.Range(-speedVariation, speedVariation);

        transform.rotation = Quaternion.Euler(0f, 0f, degreeStart);

        var verticalCameraSpeed = Hub.Get <CameraMovement>().GetVerticalSpeed();

        verticalSpeed = -1 * (verticalCameraSpeed / movementSpeed);

        if (zeroDepthOffsetElement)
        {
            triggerAtDepth += (int)zeroDepthOffsetElement.position.y;
        }
    }
Ejemplo n.º 26
0
    private void SetCommonUI_S_Dungeon()
    {
        this.goSelectPanelS_DungeonR = GUIManager.LoadCommonGUI("SelectListPanel/SelectListPanelS_DungeonR", base.gameObject);
        this.csSelectPanelS_DungeonR = this.goSelectPanelS_DungeonR.GetComponent <GUISelectPanelS_DungeonR>();
        int depth = this.txEVENT_BG.gameObject.GetComponent <UIWidget>().depth - 1;

        DepthController.SetWidgetDepth_Static(this.csSelectPanelS_DungeonR.transform, depth);
        Vector3 localPosition = this.goLP_DNG.transform.localPosition;

        this.goSelectPanelS_DungeonR.transform.localPosition.y = localPosition.x;
        GUICollider component = this.goSelectPanelS_DungeonR.GetComponent <GUICollider>();

        component.SetOriginalPos(localPosition);
        this.csSelectPanelS_DungeonR.selectParts        = this.goLP_DNG;
        this.csSelectPanelS_DungeonR.ListWindowViewRect = this.GetRectWindow(localPosition);
    }
Ejemplo n.º 27
0
 private void UpdateReacting()
 {
     if (this.useCMDAnim && this.isReActing && this.actCt == 0)
     {
         this.isReActing = false;
         DepthController.RefreshWidgetDrawCall(base.transform);
         if (this.actCBSetReOpendAction != null)
         {
             bool flag = this.actCBSetReOpendAction(0);
             if (flag)
             {
                 this.actCBSetReOpendAction = null;
             }
         }
     }
 }
Ejemplo n.º 28
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);
         }
     }
 }
Ejemplo n.º 29
0
    private void ShowLevelUpAnimation()
    {
        string          path            = "UICommon/Parts/LevelUp";
        GameObject      original        = Resources.Load(path, typeof(GameObject)) as GameObject;
        GameObject      gameObject      = UnityEngine.Object.Instantiate <GameObject>(original);
        DepthController depthController = gameObject.AddComponent <DepthController>();
        Transform       transform       = gameObject.transform;
        int             depth           = this.rightUpBG.depth;

        depthController.AddWidgetDepth(transform, depth + 10);
        transform.parent        = this.LevelUpRoot;
        transform.localPosition = Vector3.zero;
        transform.localScale    = Vector3.one;
        Animation component = gameObject.GetComponent <Animation>();

        component.Play("LevelUp");
        this.ShowParticle();
    }
Ejemplo n.º 30
0
    private void CreateIcon(GameWebAPI.RespDataMA_ChipM.Chip masterChip, GameObject goEmpty)
    {
        Action <UnityEngine.Object> actEnd = delegate(UnityEngine.Object obj)
        {
            GameObject gameObject = UnityEngine.Object.Instantiate(obj) as GameObject;
            gameObject.transform.SetParent(goEmpty.transform.parent);
            gameObject.transform.localPosition = goEmpty.transform.localPosition;
            gameObject.transform.localScale    = new Vector3(0.92f, 0.92f, 1f);
            UIWidget        component  = goEmpty.GetComponent <UIWidget>();
            DepthController component2 = gameObject.GetComponent <DepthController>();
            component2.AddWidgetDepth(component.depth);
            ChipIcon component3 = gameObject.GetComponent <ChipIcon>();
            component3.SetData(masterChip, -1, -1);
            NGUITools.DestroyImmediate(goEmpty);
        };

        AssetDataMng.Instance().LoadObjectASync("UICommon/ListParts/ListPartsChip", actEnd);
    }