Exemplo n.º 1
0
    public static void LoadMythEvolution(SOLCOMPOSE_TYPE ShowType = SOLCOMPOSE_TYPE.MYTHEVOLUTION)
    {
        SolComposeListDlg solComposeListDlg = (SolComposeListDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLCOMPOSE_LIST_DLG);

        if (solComposeListDlg != null)
        {
            solComposeListDlg.InitData();
            solComposeListDlg.ShowType = ShowType;
            solComposeListDlg.InitMythEvolutionList();
        }
    }
Exemplo n.º 2
0
    public static void LoadSelectExtractList(SOLCOMPOSE_TYPE ShowType = SOLCOMPOSE_TYPE.EXTRACT)
    {
        SolComposeListDlg solComposeListDlg = (SolComposeListDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLCOMPOSE_LIST_DLG);

        if (solComposeListDlg != null)
        {
            solComposeListDlg.InitData();
            solComposeListDlg.ShowType = ShowType;
            solComposeListDlg.InitExtractList();
        }
    }
Exemplo n.º 3
0
    public override void SetComponent()
    {
        this.bgImage = (base.GetControl("DrawTexture_BG01") as DrawTexture);
        Texture2D texture2D = CResources.Load(NrTSingleton <UIDataManager> .Instance.FilePath + "Texture/bg_solcompose") as Texture2D;

        if (null != texture2D)
        {
            this.bgImage.SetSize(GUICamera.width, GUICamera.height);
            this.bgImage.SetTexture(texture2D);
        }
        this.lbExtractItemCount = (base.GetControl("Label_Extract_Result") as Label);
        this.lbExtractItemCount.SetLocation(GUICamera.width / 2f - this.lbExtractItemCount.GetSize().x / 2f, this.lbExtractItemCount.GetLocationY(), -90f);
        this.lbExtractItemCount.Visible = false;
        this.btnOk = (base.GetControl("Button_Confirm") as Button);
        Button expr_E1 = this.btnOk;

        expr_E1.Click = (EZValueChangedDelegate)Delegate.Combine(expr_E1.Click, new EZValueChangedDelegate(this.BtnClickOk));
        this.btnOk.SetLocation(GUICamera.width / 2f - this.btnOk.GetSize().x / 2f, this.btnOk.GetLocationY(), -90f);
        this.btnOk.Hide(true);
        SolComposeMainDlg solComposeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_MAIN_DLG) as SolComposeMainDlg;

        if (solComposeMainDlg == null)
        {
            solComposeMainDlg = (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_MAIN_CHALLENGEQUEST_DLG) as SolComposeMainDlg);
        }
        if (solComposeMainDlg != null)
        {
            this.m_SolComposeMainType = solComposeMainDlg.GetSolComposeType();
            if (this.m_SolComposeMainType == SOLCOMPOSE_TYPE.EXTRACT)
            {
                this.bgImage.SetTextureKey("Win_T_WH");
                string str = string.Empty;
                str = string.Format("effect/instant/fx_direct_extraction{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath);
                WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
                wWWItem.SetItemType(ItemType.USER_ASSETB);
                wWWItem.SetCallback(new PostProcPerItem(this.SolComposeExtract), null);
                TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
            }
            else
            {
                string str2 = string.Empty;
                str2 = string.Format("UI/Soldier/fx_direct_solcompose{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath);
                WWWItem wWWItem2 = Holder.TryGetOrCreateBundle(str2 + Option.extAsset, NkBundleCallBack.UIBundleStackName);
                wWWItem2.SetItemType(ItemType.USER_ASSETB);
                wWWItem2.SetCallback(new PostProcPerItem(this.SolComposeSuccess), null);
                TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem2, DownGroup.RUNTIME, true);
            }
        }
        UIDataManager.MuteSound(true);
        this.SetSize();
        base.DonotDepthChange(360f);
        this.Hide();
    }
Exemplo n.º 4
0
 public override void SetComposeType(SOLCOMPOSE_TYPE eType)
 {
     base.SetComposeType(eType);
     for (int i = 0; i <= 3; i++)
     {
         if (i != (int)eType)
         {
             this.m_Toolbar.Control_Tab[i].controlIsEnabled = false;
         }
     }
     if (eType == SOLCOMPOSE_TYPE.COMPOSE)
     {
         this.btnRecommend.controlIsEnabled = false;
     }
 }
Exemplo n.º 5
0
    private void SetCostName()
    {
        SOLCOMPOSE_TYPE eShowType = this.m_eShowType;

        if (eShowType != SOLCOMPOSE_TYPE.COMPOSE)
        {
            if (eShowType == SOLCOMPOSE_TYPE.SELL)
            {
                this.lbCostName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("34"));
            }
        }
        else
        {
            this.lbCostName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1728"));
        }
    }
    public void SetData(NkSoldierInfo composeBaseSol, NkSoldierInfo composeMaterialSol, SOLCOMPOSE_TYPE _Type = SOLCOMPOSE_TYPE.COMPOSE)
    {
        if (composeMaterialSol == null)
        {
            this.Close();
            return;
        }
        this._dummyComposeBaseSol     = composeBaseSol;
        this._dummyComposeMaterialSol = composeMaterialSol;
        this.lbName.SetText(composeMaterialSol.GetName());
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
        {
            textFromInterface,
            "count",
            composeMaterialSol.GetLevel()
        });

        this.lbLevel.SetText(textFromInterface);
        this.dtSoldier.SetTexture(eCharImageType.SMALL, composeMaterialSol.GetCharKind(), (int)composeMaterialSol.GetGrade(), string.Empty);
        this.lbSubNum.Visible = false;
        this.lbGold.SetText(string.Format("{0:###,###,###,##0}", SolComposeMainDlg.Instance.COST));
        this.lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2033"));
        this.lbExplain.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1717"));
        this.lbMoneyName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1728"));
        this.btnOk.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1729"));
    }
Exemplo n.º 7
0
    public virtual void SetData(NkSoldierInfo kBase, List <long> kSubList, SOLCOMPOSE_TYPE _Type = SOLCOMPOSE_TYPE.COMPOSE)
    {
        if (SolComposeMainDlg.Instance == null)
        {
            base.CloseNow();
            return;
        }
        string text  = string.Empty;
        string text2 = string.Empty;
        int    kind  = 0;

        this.mBaseSolInfo = kBase;
        this.mSubSolList  = kSubList;
        this.m_SolType    = _Type;
        NkSoldierInfo nkSoldierInfo = null;

        if (this.mSubSolList != null || this.mSubSolList.Count != 0)
        {
            foreach (long current in this.mSubSolList)
            {
                NkSoldierInfo soldierInfo = SolComposeMainDlg.GetSoldierInfo(current);
                if (nkSoldierInfo == null)
                {
                    nkSoldierInfo = soldierInfo;
                }
                else if (nkSoldierInfo.GetCombatPower() < soldierInfo.GetCombatPower())
                {
                    nkSoldierInfo = soldierInfo;
                }
            }
            if (nkSoldierInfo != null)
            {
                kind  = nkSoldierInfo.GetCharKind();
                text  = nkSoldierInfo.GetName();
                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text2,
                    "count",
                    nkSoldierInfo.GetLevel()
                });
            }
            int    num   = this.mSubSolList.Count - 1;
            string text3 = string.Empty;
            text3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2034");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text3, new object[]
            {
                text3,
                "count",
                num
            });

            this.lbName.SetText(text);
            this.lbLevel.SetText(text2);
            this.dtSoldier.SetTexture(eCharImageType.SMALL, kind, (int)nkSoldierInfo.GetGrade(), string.Empty);
            this.lbSubNum.SetText(text3);
            this.lbSubNum.Visible = (0 < num);
            this.lbGold.SetText(string.Format("{0:###,###,###,##0}", SolComposeMainDlg.Instance.COST));
            SOLCOMPOSE_TYPE solType = this.m_SolType;
            if (solType != SOLCOMPOSE_TYPE.COMPOSE)
            {
                if (solType == SOLCOMPOSE_TYPE.SELL)
                {
                    this.lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("57"));
                    this.lbExplain.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("58"));
                    this.lbMoneyName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("34"));
                    this.btnOk.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("35"));
                }
            }
            else
            {
                this.lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2033"));
                this.lbExplain.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1717"));
                this.lbMoneyName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1728"));
                this.btnOk.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1729"));
            }
            return;
        }
        this.Close();
    }