public void ShowUIGuide(string param1, string param2, int winID)
    {
        if (this.ComposeNewListBox == null || this.ComposeNewListBox.Count == 0)
        {
            return;
        }
        this.guideWinID = winID;
        UIListItemContainer item = this.ComposeNewListBox.GetItem(0);

        if (item == null)
        {
            return;
        }
        if (this._Touch == null)
        {
            this._Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f);
            this._Touch.PlayAni(true);
        }
        if (this._Touch == null)
        {
            return;
        }
        this._Touch.gameObject.transform.parent = item.gameObject.transform;
        this._Touch.transform.position          = new Vector3(item.transform.position.x, item.transform.position.y, item.transform.position.z - 3f);
        BoxCollider component = this._Touch.gameObject.GetComponent <BoxCollider>();

        if (null != component)
        {
            UnityEngine.Object.Destroy(component);
        }
    }
    public void Init(int iIndex)
    {
        string name  = "BT_WorldMapTreasure" + iIndex.ToString();
        string name2 = "LB_WorldMapTreasure" + iIndex.ToString();

        this.m_DrawTreasure = UICreateControl.DrawTexture(name, "Territory_B_harvest", 80f, 80f);
        this.m_dtTreasure   = UICreateControl.DrawTexture(name2, "Win_I_Box", 50f, 50f);
        this.m_bCheck       = false;
        this.m_DrawTreasure.SetLocation(0, 0);
        this.m_dtTreasure.SetLocation(0, 0);
    }
Exemple #3
0
    public void ShowUIGuide(string param1, string param2, int winID)
    {
        if (string.IsNullOrEmpty(param1))
        {
            return;
        }
        if (this.guideWinIDList != null && !this.guideWinIDList.Contains(winID))
        {
            this.guideWinIDList.Add(winID);
        }
        string[] array = param1.Split(new char[]
        {
            ','
        });
        if (array == null || array.Length != 4)
        {
            return;
        }
        string text  = array[0];
        Button btnOK = this.m_btnOK;

        if (btnOK == null)
        {
            return;
        }
        if (this._Touch == null)
        {
            this._Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f);
        }
        if (this._Touch == null)
        {
            return;
        }
        int anchor = int.Parse(array[1]);

        this._Touch.SetAnchor((SpriteRoot.ANCHOR_METHOD)anchor);
        this._Touch.PlayAni(true);
        this._Touch.gameObject.SetActive(true);
        this._Touch.gameObject.transform.parent = btnOK.gameObject.transform;
        this._Touch.transform.position          = new Vector3(btnOK.transform.position.x, btnOK.transform.position.y, btnOK.transform.position.z - 3f);
        float x = float.Parse(array[2]);
        float y = float.Parse(array[3]);

        this._Touch.transform.eulerAngles = new Vector3(x, y, this._Touch.transform.eulerAngles.z);
        BoxCollider component = this._Touch.gameObject.GetComponent <BoxCollider>();

        if (null != component)
        {
            UnityEngine.Object.Destroy(component);
        }
    }
    public void ShowTouchButton(CQuest quest)
    {
        if (quest == null)
        {
            return;
        }
        this.m_kQuest = quest;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        int level = charPersonInfo.GetLevel(0L);

        if (3 >= level)
        {
            if ("10101_005" == quest.GetQuestUnique())
            {
                return;
            }
            QUEST_CONST.eQUESTSTATE questState = NrTSingleton <NkQuestManager> .Instance.GetQuestState(quest.GetQuestUnique());

            if ((null == this.m_Touch && quest.IsAutoMoveQuest()) || questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_COMPLETE)
            {
                if (null != this.m_Touch)
                {
                    return;
                }
                this.m_Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f);
                this.m_Touch.PlayAni(true);
                base.InteractivePanel.MakeChild(this.m_Touch.gameObject);
                this.m_Touch.SetLocation(-this.m_Touch.GetSize().x + 85f, 0f, this.m_kQuestList.GetLocation().z - 1f);
                BoxCollider component = this.m_Touch.gameObject.GetComponent <BoxCollider>();
                if (null != component)
                {
                    UnityEngine.Object.Destroy(component);
                }
            }
        }
        else
        {
            if (null != this.m_Touch)
            {
                base.InteractivePanel.RemoveChild(this.m_Touch.gameObject);
                UnityEngine.Object.Destroy(this.m_Touch.gameObject);
            }
            this.m_kQuest = null;
        }
    }
Exemple #5
0
    public void ShowUIGuide(string param1, string param2, int winID)
    {
        if (null != base.InteractivePanel)
        {
            base.InteractivePanel.depthChangeable = false;
        }
        this.m_nWinID = winID;
        this.oldZ     = base.GetLocation().z;
        base.SetLocation(base.GetLocationX(), base.GetLocationY(), NrTSingleton <FormsManager> .Instance.GetTopMostZ() + 1f);
        BookmarkDlg.TYPE tYPE = (BookmarkDlg.TYPE)((int)Enum.Parse(typeof(BookmarkDlg.TYPE), param1));
        this._GuideItem = this.bookmarkList.GetItem((int)tYPE);
        UIButton uIButton = this._GuideItem.GetElement(0) as UIButton;

        if (null != uIButton)
        {
            uIButton.EffectAni = false;
        }
        this._ButtonZ = this._GuideItem.gameObject.transform.localPosition.z;
        this._GuideItem.gameObject.transform.localPosition = new Vector3(this._GuideItem.gameObject.transform.localPosition.x, this._GuideItem.gameObject.transform.localPosition.y, -3f);
        if (!this.hide)
        {
            this._GuideItem.AlphaAni(1f, 0.5f, -0.5f);
        }
        this.bookmarkList.ScrollPosition = (float)tYPE / 8f;
        this.bookmarkList.RepositionItems();
        if (null == this._Touch)
        {
            this._Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f);
            this._Touch.PlayAni(true);
            base.InteractivePanel.MakeChild(this._Touch.gameObject);
            float y = this.bookmarkList.viewableArea.y / 2f - this._GuideItem.gameObject.transform.localPosition.y - this.bookmarkList.MoverPosY();
            this._Touch.SetLocation(-this._Touch.GetSize().x + 75f, y, this._GuideItem.gameObject.transform.localPosition.z - 1f);
            BoxCollider component = this._Touch.gameObject.GetComponent <BoxCollider>();
            if (null != component)
            {
                UnityEngine.Object.Destroy(component);
            }
        }
        if (this.hide)
        {
            this.Move();
        }
        this.bookmarkList.touchScroll = false;
    }
 public override void SetComponent()
 {
     this.BattlePosSolName    = (base.GetControl("Label_position_chaname") as Label);
     this.BattlePosSolWeapon1 = (base.GetControl("DrawTexture_position_weapon01") as DrawTexture);
     this.BattlePosSolWeapon2 = (base.GetControl("DrawTexture_position_weapon02") as DrawTexture);
     this.BattlePosSolImage   = new DrawTexture[9];
     this.BattlePosCoverImage = new DrawTexture[9];
     this.BattlePosSolSelect  = new UIRadioBtn[9];
     for (int i = 0; i < 9; i++)
     {
         string str = (i + 1).ToString();
         this.BattlePosSolImage[i] = (base.GetControl("DrawTexture_sol_0" + str) as DrawTexture);
         Vector2 size = this.BattlePosSolImage[i].GetSize();
         this.BattlePosSolSelect[i]       = UICreateControl.RadioBtn(this, "BattlePosSolSelect0" + str, string.Empty, size.x, size.y);
         this.BattlePosSolSelect[i].Data  = i;
         this.BattlePosSolSelect[i].Layer = 3;
         this.BattlePosSolSelect[i].SetLocation(this.BattlePosSolImage[i].GetLocationX(), this.BattlePosSolImage[i].GetLocationY(), -0.12f);
         this.BattlePosSolSelect[i].SetValueChangedDelegate(new EZValueChangedDelegate(this.OnClickBattlePosSolSelect));
         this.BattlePosCoverImage[i]         = (base.GetControl("DrawTexture_p_0" + str) as DrawTexture);
         this.BattlePosCoverImage[i].Visible = false;
     }
     this.BattlePosSelectedPos         = (base.GetControl("DrawTexture_selectsol") as DrawTexture);
     this.BattlePosSelectedPos.Visible = false;
     this.BattlePosReturn = (base.GetControl("btn_return") as Button);
     this.BattlePosReturn.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickBattlePosCancel));
     this.BattlePosApply = (base.GetControl("btn_apply") as Button);
     this.BattlePosApply.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickBattlePosChange));
     this.fBattlePosSlotSize = this.BattlePosSolImage[0].GetSize().x;
     this.m_btClose          = (base.GetControl("Button_Exit") as Button);
     this.m_btClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.CloseForm));
     if (!this.MakeMilitary())
     {
         base.CloseNow();
     }
     base.SetScreenCenter();
     this.InitBattlePosInfo();
     this.InitData();
 }
    public void _SetComponetBasic()
    {
        UIBaseFileManager instance = NrTSingleton <UIBaseFileManager> .Instance;

        instance.CreateCloseButton(ref this.closeButton, UIDataManager.closeButtonName, base.Scale);
        this.m_lbWorldMap_Title       = (base.GetControl("LB_Title") as Label);
        this.m_dtWorldMap_Map         = (base.GetControl("DT_map") as DrawTexture);
        this.m_dtLocalMap_Map         = (base.GetControl("DT_AreaBG") as DrawTexture);
        this.m_dtLocalMap_Day         = (base.GetControl("DT_Day") as DrawTexture);
        this.m_dtLocalMap_Day.Visible = false;
        this.m_dtLocalMap_Night       = (base.GetControl("DT_Night") as DrawTexture);
        this.m_dtLocalMap_Night.SetLocation(this.m_dtLocalMap_Night.GetLocationX(), this.m_dtLocalMap_Night.GetLocationY(), -0.004f);
        this.m_dtLocalMap_Night.Visible     = false;
        this.m_btLocalMap_ReWorld           = (base.GetControl("BT_WorldMap") as Button);
        this.m_btLocalMap_ReWorld.EffectAni = false;
        Button expr_F2 = this.m_btLocalMap_ReWorld;

        expr_F2.Click           = (EZValueChangedDelegate)Delegate.Combine(expr_F2.Click, new EZValueChangedDelegate(this.OnClickLocalMapReWorld));
        this.m_btLocalMap_Night = (base.GetControl("BT_Night") as Button);
        Button expr_12F = this.m_btLocalMap_Night;

        expr_12F.Click        = (EZValueChangedDelegate)Delegate.Combine(expr_12F.Click, new EZValueChangedDelegate(this.OnClickLocalMapNight));
        this.m_btLocalMap_Day = (base.GetControl("BT_Day") as Button);
        Button expr_16C = this.m_btLocalMap_Day;

        expr_16C.Click = (EZValueChangedDelegate)Delegate.Combine(expr_16C.Click, new EZValueChangedDelegate(this.OnClickLocalMapDay));
        this.m_btLocalMap_NpcAutoMove = (base.GetControl("BT_NpcAutoMove") as Button);
        Button expr_1A9 = this.m_btLocalMap_NpcAutoMove;

        expr_1A9.Click = (EZValueChangedDelegate)Delegate.Combine(expr_1A9.Click, new EZValueChangedDelegate(this.OnClickLocalMapNpcAutoMove));
        this.m_btLocalMap_NpcAutoMove.EffectAni = false;
        this.m_btUser_User = (base.GetControl("BT_UserBG") as Button);
        this.m_btUser_User.controlIsEnabled = false;
        this.m_dtUser_Icon = (base.GetControl("DT_UserImg") as DrawTexture);
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        Texture2D texture2D = null;

        if (myCharInfo != null)
        {
            int num      = myCharInfo.GetFaceCharKind();
            int solgrade = (int)myCharInfo.GetFaceSolGrade();
            if (num == 0)
            {
                NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

                if (nrCharUser != null)
                {
                    NkSoldierInfo soldierInfo = nrCharUser.GetPersonInfoUser().GetSoldierInfo(0);
                    if (soldierInfo != null && soldierInfo.IsValid())
                    {
                        num      = soldierInfo.GetCharKind();
                        solgrade = (int)soldierInfo.GetGrade();
                    }
                }
            }
            if (myCharInfo.UserPortrait)
            {
                texture2D = myCharInfo.UserPortraitTexture;
            }
            if (texture2D != null)
            {
                this.m_dtUser_Icon.SetTexture(texture2D);
            }
            else
            {
                string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(myCharInfo.GetFaceCostumeUnique());

                this.m_dtUser_Icon.SetTexture(eCharImageType.SMALL, num, solgrade, costumePortraitPath);
            }
        }
        this.m_btUser_User.Visible = false;
        this.m_dtUser_Icon.Visible = false;
        this.m_WorldMapInfo        = NrTSingleton <NrBaseTableManager> .Instance.GetWorldMapInfo("1");

        if (this.m_WorldMapInfo == null)
        {
            return;
        }
        this.m_MaxLocalMapCount = NrTSingleton <NrBaseTableManager> .Instance.GetLocalMapCount();

        this.m_btWorldMap_AreaIcon = new UIButton[this.m_MaxLocalMapCount];
        this.m_lbWorldMap_AreaName = new Label[this.m_MaxLocalMapCount];
        this.m_pkCharMapInfo       = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kCharMapInfo;
        this.m_selectLocalMap      = NrTSingleton <NrBaseTableManager> .Instance.GetLocalMapInfoFromMapIndex(this.m_pkCharMapInfo.m_nMapIndex);

        if (this.m_selectLocalMap == null)
        {
            this.Close();
            return;
        }
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(this.m_selectLocalMap.LOCALMAP_NAME_TEXT_INDEX);

        this.m_lbWorldMap_Title.SetText(textFromInterface);
        this.m_dtLocalMap_Map.SetTextureFromBundle(this.m_selectLocalMap.GetBundlePath());
        MAP_INFO mapInfo = NrTSingleton <NrBaseTableManager> .Instance.GetMapInfo(this.m_pkCharMapInfo.m_nMapIndex.ToString());

        if (mapInfo != null && mapInfo.MAP_NIGHTMODE == 1)
        {
            this.m_bNowNightMode = true;
        }
        string name  = string.Empty;
        string name2 = string.Empty;

        this.m_btLocalMap_AreaIcon = new UIButton[20];
        this.m_lbLocalMap_AreaName = new Label[20];
        for (int i = 0; i < 20; i++)
        {
            name  = "BT_LocalMapAreaIcon" + i.ToString();
            name2 = "LB_LocalMapAreaName" + i.ToString();
            this.m_btLocalMap_AreaIcon[i] = UICreateControl.Button(name, "Main_B_Map", 64f, 64f);
            this.m_lbLocalMap_AreaName[i] = UICreateControl.Label(name2, null, false, 280f, 28f, SpriteText.Font_Effect.Black_Shadow_Small, SpriteText.Anchor_Pos.Middle_Center, SpriteText.Alignment_Type.Left, Color.white);
            if (null != this.m_btLocalMap_AreaIcon[i])
            {
                this.m_btLocalMap_AreaIcon[i].Data = 0;
                this.m_btLocalMap_AreaIcon[i].SetSize(64f, 64f);
                this.m_btLocalMap_AreaIcon[i].Start();
                this.m_btLocalMap_AreaIcon[i].UseDefaultSound = false;
                this.m_lbLocalMap_AreaName[i].Visible         = false;
                base.InteractivePanel.MakeChild(this.m_btLocalMap_AreaIcon[i].gameObject);
                base.InteractivePanel.MakeChild(this.m_lbLocalMap_AreaName[i].gameObject);
            }
        }
        for (int j = 0; j < 20; j++)
        {
            this.m_pTreasure[j] = new TreasureData();
            this.m_pTreasure[j].Init(j);
            this.m_pTreasure[j].TreasureShow(false);
            if (this.m_pTreasure[j].GetTexture())
            {
                base.InteractivePanel.MakeChild(this.m_pTreasure[j].GetTexture().gameObject);
            }
            if (this.m_pTreasure[j].GetDrawTexture())
            {
                base.InteractivePanel.MakeChild(this.m_pTreasure[j].GetDrawTexture().gameObject);
            }
        }
        this.SetLocalMapTitle();
        this.SetLocalMapMapIcon();
        for (int k = 0; k < this.m_MaxLocalMapCount; k++)
        {
            int           num2         = k + 1;
            LOCALMAP_INFO localMapInfo = NrTSingleton <NrBaseTableManager> .Instance.GetLocalMapInfo(num2.ToString());

            if (localMapInfo != null)
            {
                if (localMapInfo.LOCALMAP_IDX == num2)
                {
                    if (localMapInfo != null)
                    {
                        name  = "BT_WorldMapAreaIcon" + k.ToString();
                        name2 = "LB_WorldMapAreaName" + k.ToString();
                        this.m_btWorldMap_AreaIcon[k]           = UICreateControl.Button(name, localMapInfo.LOCALMAP_ICON, 64f, 64f);
                        this.m_btWorldMap_AreaIcon[k].EffectAni = false;
                        string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(localMapInfo.LOCALMAP_NAME_TEXT_INDEX);

                        this.m_lbWorldMap_AreaName[k] = UICreateControl.Label(name2, NrTSingleton <CTextParser> .Instance.GetTextColor("1002") + textFromInterface2, false, 280f, 28f, SpriteText.Font_Effect.Black_Shadow_Small, SpriteText.Anchor_Pos.Middle_Center, SpriteText.Alignment_Type.Left, Color.white);
                        if (null != this.m_btWorldMap_AreaIcon[k])
                        {
                            this.m_btWorldMap_AreaIcon[k].AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickWorldMapToLocalArea));
                            this.m_btWorldMap_AreaIcon[k].SetLocation(localMapInfo.LOCALMAP_X + 20f, localMapInfo.LOCALMAP_Y + 64f);
                            this.m_btWorldMap_AreaIcon[k].Data = localMapInfo.LOCALMAP_IDX;
                            this.m_lbWorldMap_AreaName[k].SetLocation(localMapInfo.LOCALMAP_X + 20f + -107f, localMapInfo.LOCALMAP_Y + 64f + 84f);
                            base.InteractivePanel.MakeChild(this.m_btWorldMap_AreaIcon[k].gameObject);
                            base.InteractivePanel.MakeChild(this.m_lbWorldMap_AreaName[k].gameObject);
                        }
                        this.m_btWorldMap_AreaIcon[k].Start();
                        if (!NrTSingleton <ContentsLimitManager> .Instance.IsWorldMapMove(num2))
                        {
                            this.m_btWorldMap_AreaIcon[k].Hide(true);
                            this.m_lbWorldMap_AreaName[k].Hide(true);
                        }
                    }
                }
            }
        }
        base.SetScreenCenter();
        this.ShowLocalMap(true);
        this.SetUserIcon();
    }
    public void ShowUIGuide(string param1, string param2, int winID)
    {
        if (string.IsNullOrEmpty(param1))
        {
            return;
        }
        if (this.guideWinIDList != null && !this.guideWinIDList.Contains(winID))
        {
            this.guideWinIDList.Add(winID);
        }
        string[] array = param1.Split(new char[]
        {
            ','
        });
        if (array == null || array.Length != 4)
        {
            return;
        }
        string    a         = array[0];
        IUIObject iUIObject = null;

        if (a == "MATERIAL_GUIDE")
        {
            int index = 4;
            UIListItemContainer item = this.m_NewListBox_Reincarnate.GetItem(index);
            if (item == null)
            {
                return;
            }
            iUIObject = item.GetElement(10);
        }
        else if (a == "EVOLUTION_GUIDE")
        {
            iUIObject = base.GetControl("btn_Legend");
        }
        if (iUIObject == null)
        {
            return;
        }
        if (this._Touch == null)
        {
            this._Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f);
        }
        if (this._Touch == null)
        {
            return;
        }
        int anchor = int.Parse(array[1]);

        this._Touch.SetAnchor((SpriteRoot.ANCHOR_METHOD)anchor);
        this._Touch.PlayAni(true);
        this._Touch.gameObject.SetActive(true);
        this._Touch.gameObject.transform.parent = iUIObject.gameObject.transform;
        this._Touch.transform.position          = new Vector3(iUIObject.transform.position.x, iUIObject.transform.position.y, iUIObject.transform.position.z - 3f);
        float x = float.Parse(array[2]);
        float y = float.Parse(array[3]);

        this._Touch.transform.eulerAngles = new Vector3(x, y, this._Touch.transform.eulerAngles.z);
        BoxCollider component = this._Touch.gameObject.GetComponent <BoxCollider>();

        if (null != component)
        {
            UnityEngine.Object.Destroy(component);
        }
    }