Exemple #1
0
        /// <summary>
        /// 显示
        /// </summary>
        /// <param name="sirenAddition">自身妖女加成</param>
        /// <param name="practiceResult">4小时修为</param>
        public void Show(int sirenAddition, int practiceResult)
        {
            Label_AdditionBySiren.text = sirenAddition.ToString() + "%";
            Label_ForceTime.text       = "4" + LanguageTextManager.GetString("IDS_H1_514");
            Label_BreakthroughGet.text = practiceResult.ToString();
            var playerData = PlayerManager.Instance.FindHeroDataModel();
            int PLAYER_FIELD_BREAKTHROUGHNUM = playerData.PlayerValues.PLAYER_FIELD_BREAKTHROUGHNUM;

            Label_BreakthroughTimes.text = PLAYER_FIELD_BREAKTHROUGHNUM.ToString() + "/" + CommonDefineManager.Instance.CommonDefine.PlayerRoom_PayTime.ToString();
            if (PLAYER_FIELD_BREAKTHROUGHNUM <= 0)
            {
                m_IsCantBreak = true;
            }
            else
            {
                m_IsCantBreak = false;
            }
            int bindPay    = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_BINDPAY;
            int break_cost = CommonDefineManager.Instance.CommonDefine.PlayerRoom_Pay;

            if (bindPay < break_cost)
            {
                Label_Cost.color  = Color.red;
                m_IsNotEnoughBind = true;
            }
            else
            {
                Label_Cost.color  = Color.white;
                m_IsNotEnoughBind = false;
            }
            Label_Cost.text = break_cost.ToString();
            this.ShowPanel();
        }
Exemple #2
0
        void RefreshTime()
        {
            float temptime = mailEndTime.ExpireTime - (Time.realtimeSinceStartup - mailEndTime.UpdateTime);

            if (temptime <= 0)
            {
                List <long> list = new List <long>();
                list.Add(_EamilItem.llMailID);
                EmailDataManager.Instance.DeleteEmailFromLocalList(list);
                UI.MainUI.EmailInfoPanelManager.GetInstance().SC_EmailTabManager.Sc_EmailContainerList.StartRefreshList(false);

                TimeLable.text = string.Format(LanguageTextManager.GetString("IDS_I22_5"), NGUIColor.SetTxtColor("0", TextColor.ChatYellow));
            }
            else
            {
                int leftDay    = ((int)temptime) / 60 / 60 / 24;
                int leftHour   = ((int)temptime) / 60 / 60 % 24;
                int leftminute = ((int)temptime) / 60 % 60;
                //long m_leftSconds = LeftSconds % 60;
                if (leftDay > 0)
                {
                    TimeLable.text = string.Format(LanguageTextManager.GetString("IDS_I22_4"), NGUIColor.SetTxtColor(leftDay.ToString(), TextColor.ChatYellow));
                }
                else if (leftHour > 0)
                {
                    TimeLable.text = string.Format(LanguageTextManager.GetString("IDS_I22_5"), NGUIColor.SetTxtColor(leftHour.ToString(), TextColor.ChatYellow));
                }
                else if (leftminute > 0)
                {
                    TimeLable.text = string.Format(LanguageTextManager.GetString("IDS_I22_6"), NGUIColor.SetTxtColor(leftminute.ToString(), TextColor.ChatYellow));
                }
            }
        }
Exemple #3
0
        private IEnumerator RefreshList()
        {
            NoneItemLable.gameObject.SetActive(false);
            UnReadLable_go.SetActive(true);
            //ItemTable.transform.ClearChild();
            //ItemList.Clear();
            InitItemFileinfoList();
            if (EmailList.Count >= CommonDefineManager.Instance.CommonDefine.MailLimit)
            {
                MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I22_10"), 1);
            }
            // TraceUtil.Log(SystemModel.wanglei,"s");
            InitFirstPageData();
            ItemTable.Reposition();
            ItemTable.transform.parent.GetComponent <UIDraggablePanel>().ResetPosition();
            yield return(null);

            if (EmailList.Count == 0)
            {
                UnReadLable_go.SetActive(false);
                NoneItemLable.gameObject.SetActive(true);
            }
            foreach (var item in ItemList)
            {
                //引导按钮
                item.gameObject.RegisterBtnMappingId((int)item._EamilItem.wEmailType, UIType.Mail, BtnMapId_Sub.Mail_MailItem);
            }
        }
Exemple #4
0
 //处理解锁
 void OnDealSendData(CarryShopItem item, EMessageCoinType coinType, int price, bool isUnLock)
 {
     if (!CarryShopModel.Instance.isJudgeMoneyEnough(coinType, price))
     {
         SoundManager.Instance.PlaySoundEffect("Sound_Button_Auction_Fail");
         if (coinType == EMessageCoinType.ECuType)
         {
             UI.MessageBox.Instance.ShowNotEnoughMoneyMsg(null);
         }
         else
         {
             UI.MessageBox.Instance.ShowNotEnoughGoldMoneyMsg();
         }
     }
     else
     {
         if (isUnLock)
         {
             SoundManager.Instance.PlaySoundEffect("Sound_Button_Shop_UnlockConfirm");
             NetServiceManager.Instance.TradeService.SendCarryShopUnLock_CS(PlayerManager.Instance.FindHeroDataModel().ActorID, item.shopUint.byIndex);
         }
         else
         {
             int pack = GetGoodsHavePacks((int)item.shopUint.dwShopID);
             if (pack > 0 && ContainerInfomanager.Instance.PackIsFull())
             {
                 UI.MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_H2_2"), 1);                      // IDS_H2_2
                 return;
             }
             NpcPlayAnim("LadyAction07");
             SoundManager.Instance.PlaySoundEffect("Sound_UIEff_ShopLady");
             NetServiceManager.Instance.TradeService.SendCarryShopBuy_CS(item.shopUint.dwShopID, item.shopUint.byIndex, item.shopUint.dwShopNum);
         }
     }
 }
Exemple #5
0
        public void Init(int itemID, int number)
        {
            ItemData getItem = ItemDataManager.Instance.GetItemData(itemID);

            CreatObjectToNGUI.InstantiateObj(getItem._picPrefab, CreatIconPoint);
            TextColor labelColor = TextColor.white;

            switch (getItem._ColorLevel)
            {
            case 0:
                labelColor = TextColor.EquipmentGreen;
                break;

            case 1:
                labelColor = TextColor.EquipmentBlue;
                break;

            case 2:
                labelColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                labelColor = TextColor.EquipmentYellow;
                break;
            }
            NameLabel.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(getItem._szGoodsName), labelColor));
            NumberLabel.SetText(NGUIColor.SetTxtColor(string.Format("+{0}", number), labelColor));
        }
Exemple #6
0
    public void Init(UpgradeRequire upgradeRequire)
    {
        ItemFielInfo itemfileinfo = new ItemFielInfo(upgradeRequire.GoodsId);

        iconItem.Init(itemfileinfo);
        Lable_name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileinfo.LocalItemData._szGoodsName), (TextColor)itemfileinfo.LocalItemData._ColorLevel));
        if (upgradeRequire.GoodsId == 3050001)
        {
            if (upgradeRequire.Count <= ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire))
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(upgradeRequire.Count, TextColor.green));
            }
            else
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(upgradeRequire.Count, TextColor.red));
            }
        }
        else
        {
            if (upgradeRequire.Count <= ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire))
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire) + "/" + upgradeRequire.Count, TextColor.green));
            }
            else
            {
                Lable_count.SetText(NGUIColor.SetTxtColor(ContainerInfomanager.Instance.GetOwnMaterialCount(upgradeRequire) + "/" + upgradeRequire.Count, TextColor.red));
            }
        }
    }
Exemple #7
0
 public void ShowPanel(LineType type, SMsgActionXiuLianInfo_SC xiuLianInfo)
 {
     transform.localPosition = Vector3.zero;
     if (type == LineType.Online)
     {
         Interface_Online.SetActive(true);
         Interface_Offline.SetActive(false);
         int time   = xiuLianInfo.XiuLianTime;
         int hour   = time / 3600;
         int min    = (time - hour * 3600) / 60;
         int second = time % 60;
         Label_OnlineTime.text  = string.Format(LanguageTextManager.GetString("IDS_H1_513"), ParseClock(hour), ParseClock(min), ParseClock(second));
         Label_OnlineValue.text = xiuLianInfo.XiuLianNum.ToString();
     }
     else
     {
         Interface_Online.SetActive(false);
         Interface_Offline.SetActive(true);
         int time = xiuLianInfo.XiuLianTime;
         if (time > 86400)
         {
             int day = time / 86400;
             Label_OfflineTime.text = day + LanguageTextManager.GetString("IDS_H1_510");
         }
         else
         {
             int hour = time / 3600;
             int min  = (time - hour * 3600) / 60;
             Label_OfflineTime.text = hour.ToString() + LanguageTextManager.GetString("IDS_H1_512") + ParseClock(min) + LanguageTextManager.GetString("IDS_H1_511");
         }
         Label_OfflineValue.text = xiuLianInfo.XiuLianNum.ToString();
     }
     m_lastXiuLianNum = xiuLianInfo.XiuLianNum;
 }
Exemple #8
0
 //收到服务器消息
 void OnBuySuccess(object obj)
 {
     //显示一个messagebox//
     UI.MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I7_43"), 1f);
     //关闭界面//
     Destroy(gameObject);
 }
Exemple #9
0
    public void AwardDesInit(int sequence, string iconName, string levelName, string leftIconID, string leftDesID, string rightIconID, string rightDesID)
    {
        if (!HasInit)
        {
            LevelIcon.spriteName = iconName;
            bool showDeep = (sequence % 2 == 0);

            LeftBackgroundDeep.SetActive(showDeep);
            LeftBackgroundShallow.SetActive(!showDeep);
            RightBackgroundDeep.SetActive(showDeep);
            RightBackgroundShallow.SetActive(!showDeep);

            LeftLabel.text = LanguageTextManager.GetString(levelName);

            HasInit = true;
        }

        AwardLeftIcon.spriteName  = leftIconID;
        AwardLeftDes.text         = LanguageTextManager.GetString(leftDesID);
        AwardRightIcon.spriteName = rightIconID;
        AwardRightDes.text        = LanguageTextManager.GetString(rightDesID);

        AwardType.SetActive(true);
        DesType.SetActive(false);
    }
Exemple #10
0
 /// <summary>
 /// 删除好友按钮
 /// </summary>
 /// <param name="obj"></param>
 void OnDeleteFriendBtnClick(object obj)
 {
     SoundManager.Instance.PlaySoundEffect("Sound_Button_Default");
     //MessageBox.Instance.Show(5, "", "确定要删除好友" + PlayerName.text , "删除好友", "取消", DelFriendMsgBox, null);
     MessageBox.Instance.Show(5, "", string.Format(LanguageTextManager.GetString("IDS_H1_94"), PlayerName.text, m_profession, m_curPlayerLevel.ToString()),
                              LanguageTextManager.GetString("IDS_H2_30"), LanguageTextManager.GetString("IDS_H2_28"), DelFriendMsgBox, null);
 }
Exemple #11
0
        void ShowRightBottom()
        {
            int classVocation = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_VOCATION;
            int getRewardMark = DailySignModel.Instance.reachConditionMap[DailySignModel.Instance.curSelectActivityID];
            int selSub        = DailySignModel.Instance.GetActiveRewardSub(DailySignModel.Instance.curSelectActivityID);
            int byIndex       = 0;

            if (getRewardMark == 2)
            {
                byIndex = DailySignModel.Instance.sActiveMsgInteract_OpenUI.activeList[selSub].byIndex;
            }
            else
            {
                byIndex = DailySignModel.Instance.sActiveMsgInteract_OpenUI.activeList[selSub].byIndex + 1;
            }
            //bool isGetRewardMark = DailySignModel.Instance.GetCurActShowIndex (DailySignModel.Instance.curSelectActivityID,ref byIndex);
            ShowIcon(activityConfig.rewardList[byIndex][classVocation]);
            string strDes = LanguageTextManager.GetString(activityConfig.QualifiedDescription);
            int    curVal = DailySignModel.Instance.sActiveMsgInteract_OpenUI.activeList [selSub].dwActiveParam;
            int    maxVal = activityConfig.qualifiedList[byIndex];

            if (DailySignModel.Instance.curSelectActivityID == DailySignModel.Instance.timerActivityID)
            {
                curVal = curVal / 60;
            }
            if (curVal > maxVal)
            {
                curVal = maxVal;
            }
            //玩家角色登录游戏达到{1}天。({2}/{3})
            conditionInfo.text = string.Format(strDes, maxVal, curVal, maxVal);
            SetGetRewardBtn(getRewardMark);
        }
Exemple #12
0
        //队长开始按钮
        void OnCaptainStartClick(object obj)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_Button_TeamStart");
            //判断是否全部队员准备
            bool isAllReady = true;
            var  myTeamProp = TeamManager.Instance.MyTeamProp;

            myTeamProp.TeamMemberNum_SC.SMsgTeamPropMembers.ApplyAllItem(p =>
            {
                if (p.TeamMemberContext.byFightReady == 0)
                {
                    isAllReady = false;
                }
            });
            if (!isAllReady)
            {
                //MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_H1_168"), LanguageTextManager.GetString("IDS_H2_55"));
                MessageBox.Instance.ShowTips(4, LanguageTextManager.GetString("IDS_H1_168"), 1f);
                return;
            }

            //this.SpecialEctypeStart(null);
            var teamProp = TeamManager.Instance.MyTeamProp;
            int ectypeID = EctypeConfigManager.Instance.EctypeSelectConfigList[teamProp.TeamContext.dwEctypeId]._vectContainer[teamProp.TeamContext.dwEctypeIndex - 1];
            EctypeContainerData SelectContainerData = EctypeConfigManager.Instance.EctypeContainerConfigList[ectypeID];

            if (SelectContainerData.lEctypeType == 9 && myTeamProp.TeamMemberNum_SC.SMsgTeamPropMembers.Length <= 1)
            {
                MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_I19_32").Replace(@"\n", "\n"), LanguageTextManager.GetString("IDS_I19_11"), LanguageTextManager.GetString("IDS_I19_12"), CancelCrusade, ShowCostLabelInButton);
            }
            else
            {
                ShowCostLabelInButton();
            }
        }
Exemple #13
0
        //队长解散按钮
        void OnCaptainDisbandClick(object obj)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_Button_TeamRoomBack");

            MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_I13_43"),
                                     LanguageTextManager.GetString("IDS_H2_28"), LanguageTextManager.GetString("IDS_H2_19"), CancelDisbandTeam, DisbandTeam);
        }
Exemple #14
0
 void Awake()
 {
     From_Des.SetText(LanguageTextManager.GetString("IDS_I22_13"));
     Title_Des.SetText(LanguageTextManager.GetString("IDS_I22_14"));
     Noneattachments.SetText(LanguageTextManager.GetString("IDS_I22_18"));
     RegEvent();
 }
Exemple #15
0
        void SetServerStatus()
        {
            string StatusStr = "";

            switch (server.Status)
            {
            case 0:
                StatusStr = LanguageTextManager.GetString("IDS_H1_228");
                break;

            case 1:
                StatusStr = LanguageTextManager.GetString("IDS_H1_227");
                break;

            case 2:
                StatusStr = LanguageTextManager.GetString("IDS_H1_226");
                break;

            case 3:
                StatusStr = LanguageTextManager.GetString("IDS_H1_225");
                break;

            default:
                break;
            }
            //this.ServerIsbusy.SetText(StatusStr);
            this.IsbusyIcon.ChangeSprite(server.Status + 1);
        }
Exemple #16
0
        public void Init(CardType type, object ectypeConfig, Action <int> act)
        {
            if (m_EctypeIcon != null)
            {
                Destroy(m_EctypeIcon);
            }

            if (type == CardType.Area)
            {
                var ectypeData = (EctypeSelectConfigData)ectypeConfig;
                m_EctypeID          = ectypeData._lEctypeID;
                m_EctypeIcon        = UI.CreatObjectToNGUI.InstantiateObj(ectypeData._EctypeIconPrefab, EctypeIconPoint);
                Label_AreaName.text = LanguageTextManager.GetString(ectypeData._szName);
                AreaInterface.SetActive(true);
                EctypeInterface.SetActive(false);
            }
            else
            {
                var containerData = (EctypeContainerData)ectypeConfig;
                m_EctypeID = containerData.lEctypeContainerID;
                var containerIconData = TownEctypeResDataManager.Instance.GetEctypeContainerResData(m_EctypeID);
                m_EctypeIcon          = UI.CreatObjectToNGUI.InstantiateObj(containerIconData.EctypeIconPrefab, EctypeIconPoint);
                Label_EctypeName.text = LanguageTextManager.GetString(containerData.lEctypeName);
                Label_Level.text      = containerData.lMinActorLevel.ToString() + LanguageTextManager.GetString("IDS_H1_156");
                AreaInterface.SetActive(false);
                EctypeInterface.SetActive(true);
            }
            m_OnClickCallBack = act;
        }
Exemple #17
0
        void SetTreasureItemNameLabel(ItemData itemData, int number)
        {
            TextColor NameTextColor = TextColor.white;

            switch (itemData._ColorLevel)//物品品质颜色
            {
            case 0:
                NameTextColor = TextColor.EquipmentGreen;
                break;

            case 1:
                NameTextColor = TextColor.EquipmentBlue;
                break;

            case 2:
                NameTextColor = TextColor.EquipmentMagenta;
                break;

            case 3:
                NameTextColor = TextColor.EquipmentYellow;
                break;

            default:
                break;
            }
            string ItemName = LanguageTextManager.GetString(itemData._szGoodsName);
            string format   = LanguageTextManager.GetString("IDS_I21_10");

            TreasureChestsItemNameLabel.SetText(NGUIColor.SetTxtColor(string.Format(format, ItemName, number), NameTextColor));
        }
Exemple #18
0
    /// <summary>
    /// 刷新任务快速引导的 新功能开启特效和任务提示文本
    /// </summary>
    /// <param name="args"></param>
    public void RefreshTaskQuickInfo()
    {
        var funEff = TaskModel.Instance.GetTaskOpenNewFunctionIcon();

        HeadIconPoint.transform.ClearChild();
        if (funEff != null)
        {
            NewFunctionEff.SetActive(true);
            var headIcon = NGUITools.AddChild(HeadIconPoint, funEff);
            headIcon.transform.localScale = funEff.transform.localScale;
        }
        else
        {
            NewFunctionEff.SetActive(false);
        }
        if (m_taskState != null)
        {
            TaskTips.SetActive(true);
            m_taskTips.text = LanguageTextManager.GetString(m_taskState.TaskNewConfigData.TaskTitle);
        }
        else
        {
            TaskTips.SetActive(false);
            NewFunctionEff.SetActive(false);
        }
    }
Exemple #19
0
        /// <summary>
        /// 购买物品
        /// </summary>
        public void BuyGoods(SMsgTradeOpenShopGoodsInfo_SC sMsgTradeOpenShopGoodsInfo_SC)
        {
            var ContainerSize     = UI.MainUI.ContainerInfomanager.Instance.GetContainerClientContsext(2);
            var ItemContainerGood = UI.MainUI.ContainerInfomanager.Instance.sSyncContainerGoods_SCs;
            int ItemCount         = ContainerInfomanager.Instance.GetPackItemList().Count; // ItemContainerGood.FindAll((SSyncContainerGoods_SC P) => { return P.uidGoods > 0; }).Count;

            if (ItemCount < 80)                                                            //判断背包是否已满
            {
                if (!ContainerInfomanager.Instance.PackIsFull())
                {
                    ShowSelectGoodsNumberPanel(sMsgTradeOpenShopGoodsInfo_SC);
                }
                else
                {
                    //弹出解锁背包提示框
                    if (unlockContainerBoxTips == null)
                    {
                        unlockContainerBoxTips = CreatObjectToNGUI.InstantiateObj(unlockContainerBoxTipsPrefab, transform).GetComponent <UnlockContainerBoxTips>();
                    }
                    unlockContainerBoxTips.Show(LanguageTextManager.GetString("IDS_H1_205"), ShowUnLockContainerMessageBox, null,
                                                LanguageTextManager.GetString("IDS_H2_56"), LanguageTextManager.GetString("IDS_H2_28"));
                    //ShowUnLockContainerMessageBox();//解锁新背包
                }
            }
            else
            {
                MessageBox.Instance.Show(3, "", LanguageTextManager.GetString("IDS_H2_2"), LanguageTextManager.GetString("IDS_H2_55"), null);
            }
        }
Exemple #20
0
        //public void ShowCostMoneyMessageBox(CostMoneyType CostMoneyType, int CostMoneyNumber, string Msg, string SureBtnStr, string CancelBtnStr, ButtonCallBack SureBtnCallBack, ButtonCallBack CancelBtnCallBack)
        //{
        //    if (costMoneyMessageBox == null)
        //    {
        //        costMoneyMessageBox = CreatObjectToNGUI.InstantiateObj(CostMoneyMessagePrefab,transform).GetComponent<CostMoneyMessageBox>();
        //    }
        //    costMoneyMessageBox.Show(CostMoneyType, CostMoneyNumber, Msg, SureBtnStr, CancelBtnStr, SureBtnCallBack, CancelBtnCallBack);
        //}

        /// <summary>
        /// 显示果实成熟时间
        /// </summary>
        void ShwoFruitLeftTime()
        {
            string ShowMsg = "";
            SMsgActionFruitContext_SC GrowUpFruit = TreasureTreesData.Instance.FruitDataList.FirstOrDefault(P => P.byFruitStatus != 4);

            if (GrowUpFruit.dwFruitID != 0)
            {
                foreach (var child in TreasureTreesData.Instance.FruitDataList)
                {
                    if (child.byFruitStatus != 4 && child.dwEndTime < GrowUpFruit.dwEndTime)
                    {
                        GrowUpFruit = child;
                    }
                }
                long LeftSconds = GrowUpFruit.dwEndTime - TreasureTreesData.Instance.GetNowTimes();
                //TraceUtil.Log("FastFruit:" + GrowUpFruit.dwEndTime.ToString() + "NowTime:" + TreasureTreesData.Instance.GetNowTimes());
                //TraceUtil.Log("LeftSconds:"+LeftSconds);
                long leftDay      = LeftSconds / 60 / 60 / 24;
                long leftHour     = LeftSconds / 60 / 60 % 24;
                long leftminute   = LeftSconds / 60 % 60;
                long m_leftSconds = LeftSconds % 60;
                ShowMsg = string.Format(LanguageTextManager.GetString("IDS_H1_456"), leftHour < 0?0:leftHour, leftminute < 0?0:leftminute, m_leftSconds < 0?0:m_leftSconds);
                NextGrowUpTip.SetActive(true);
                AllGrowUpTip.SetActive(false);
            }
            else
            {
                NextGrowUpTip.SetActive(false);
                AllGrowUpTip.SetActive(true);
                ShowMsg = "";//全部成熟提示
            }
            TimeLeftLabel.SetText(ShowMsg);
        }
Exemple #21
0
 void Init()
 {
     if (isRead)
     {
         return;
     }
     isRead = true;
     //npc展示
     NpcObj = GameObject.Instantiate(NPCPrefab) as GameObject;
     NpcObj.transform.parent        = NPCCamera.transform.Find("ModelParent");
     NpcObj.transform.localPosition = NpcPos;
     NpcObj.transform.localRotation = Quaternion.Euler(0, 197f, 0);
     NpcObj.transform.localScale    = Vector3.one;
     DefaultAnim = "LadyTIdle01";            //NpcObj.animation.clip.name;
     NpcObj.animation.CrossFade(DefaultAnim);
     btnBack.SetCallBackFuntion(OnClickBackEvent);
     btnRefreshNextTimes.SetCallBackFuntion(OnClickNextTimesEvent);
     btnArrowLeft.SetCallBackFuntion(OnClickLeftEvent);
     btnArrowRight.SetCallBackFuntion(OnClickRightEvent);
     btnInfo.SetPressCallBack(OnPressInfoEvent);
     downTimeNameLabel.text = LanguageTextManager.GetString("IDS_I29_6");
     CreateListItem();
     NetServiceManager.Instance.TradeService.SendCarryShopUI_CS(0);
     UIEventManager.Instance.RegisterUIEvent(UIEventType.RcvCarryShopUIDataEvent, OnRcvCarryShopUIDataEvent);
     UIEventManager.Instance.RegisterUIEvent(UIEventType.RcvCarryShopBuyEvent, OnRcvCarryShopBuyEvent);
     UIEventManager.Instance.RegisterUIEvent(UIEventType.RcvCarryShopUnLockEvent, OnRcvCarryShopUnLockEvent);
 }
Exemple #22
0
        public void Init(ForgeRecipeData data)
        {
            clickItem.Init(data.ForgeEquipmentID);
            IconPoint.ClearChild();
            ItemData itemdata = ItemDataManager.Instance.GetItemData(data.ForgeEquipmentID);

            IconBackground.ChangeSprite(itemdata._ColorLevel + 1);
            CreatObjectToNGUI.InstantiateObj(ForgingRecipeConfigDataManager.Instance.GetGoodsProfab(data.ForgeEquipmentID), IconPoint);
            Label_GoodsName.text = ForgingRecipeConfigDataManager.Instance.GetGoodsName(data.ForgeEquipmentID);
            IDS_GoodsDes.SetText(LanguageTextManager.GetString(itemdata._szDesc));
            if (itemdata._GoodsClass == 1)
            {
                Lable_Level.gameObject.SetActive(true);
                go_Profession.SetActive(true);
                Lable_Profession.SetText(ForgingRecipeConfigDataManager.Instance.GetProfession(data.ForgeEquipmentID));
                // go_IconItem.transform.localPosition=pos_IconItem_equip;
                Lable_Level.SetText(ForgingRecipeConfigDataManager.Instance.GetGoodsLevel(data.ForgeEquipmentID));
            }
            else
            {
                Lable_Level.gameObject.SetActive(false);
                go_Profession.SetActive(false);
                // go_IconItem.transform.localPosition=pos_IconItem_Other;
            }
        }
Exemple #23
0
    public void Init(ItemFielInfo itemfileInfo)
    {
        IconItem.Init(itemfileInfo);
        Lable_name.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemfileInfo.LocalItemData._szGoodsName), (TextColor)itemfileInfo.LocalItemData._ColorLevel));
        Lable_position.SetText(EquipmentUpgradeDataManger.Instance.PositionDic[itemfileInfo.LocalItemData._GoodsSubClass]);
        Lable_Currentforce.SetText((int)EquipItem.GetEquipForce(itemfileInfo));
        int addforce = ((int)EquipItem.GetNextLevelEquipForce(itemfileInfo, UpgradeType.StarUp) - (int)EquipItem.GetEquipForce(itemfileInfo));

        if (addforce > 0)
        {
            Lable_addForce.gameObject.SetActive(true);
            Lable_addForce.SetText("+" + addforce);
        }
        else
        {
            Lable_addForce.gameObject.SetActive(false);
        }
        //Lable_strengthLevle.SetText(EquipmentUpgradeDataManger.Instance.GetStrengthLevel(itemfileInfo));
        int starLevel = PlayerDataManager.Instance.GetEquipmentStarLevel((EquiptSlotType)itemfileInfo.sSyncContainerGoods_SC.nPlace);

        if (starLevel < CommonDefineManager.Instance.CommonDefine.StartStrengthLimit)
        {
            Eff_go.SetActive(true);
        }
        else
        {
            Eff_go.SetActive(false);
        }
        SetStarColor(starLevel);
    }
Exemple #24
0
        void TeamMemberLeaveHandle(INotifyArgs e)
        {
            SMsgTeamMemberLeave_SC teamMemberLeave = (SMsgTeamMemberLeave_SC)e;
            var playerData = PlayerManager.Instance.FindHeroDataModel();

            if (teamMemberLeave.dwActorID == playerData.ActorID)
            {
                ShowWorldTeamInfo();
                if (isKick)
                {
                    //MessageBox.Instance.Show(4, "", LanguageTextManager.GetString("IDS_H1_162"), LanguageTextManager.GetString("IDS_H2_55"));
                    MessageBox.Instance.ShowTips(4, LanguageTextManager.GetString("IDS_H1_162"), 1f);
                    //刷新队伍
                    TeamOrganizePanel.OnRefreshWorldTeamInfoClick(0);
                }
            }
            else
            {
                //先删除之前的队员model
                TeamRoomPanel.DeleteHeroModels();
                var teamData = TeamManager.Instance.MyTeamProp;
                TeamRoomPanel.UpdateTeammateInfo(new SMsgTeamNum_SC()
                {
                    SMsgTeamProps = new SMsgTeamProp_SC[1] {
                        teamData
                    }
                });
            }
        }
Exemple #25
0
    /// <summary>
    /// 初始化任务奖励信息信息
    /// </summary>
    /// <param name="itemFielInfo">Item fiel info.</param>
    public void InitItemData(ItemData itemData, int awardAmount)
    {
        if (itemData != null)
        {
            m_GoodsID = itemData._goodID;
            //装备图标
            if (ItemIconPoint.childCount > 0)
            {
                ItemIconPoint.ClearChild();
            }
            var skillIcon = CreatObjectToNGUI.InstantiateObj(itemData._picPrefab, ItemIconPoint);
            skillIcon.transform.localScale = new Vector3(90, 90, 1);


            AwardAmount.text = "+" + awardAmount.ToString();
            var itemName = LanguageTextManager.GetString(itemData._szGoodsName);

            itemName        = itemName.SetColor((TextColorType)itemData._ColorLevel);
            AwardTitle.text = itemName;
        }
        else
        {
            TraceUtil.Log(SystemModel.Rocky, TraceLevel.Error, "装备为空-- EquipItem->InitItemData");
        }
    }
Exemple #26
0
    //上发炼化请求
    public bool SendLianHuaMsg()
    {
        bool isSendSuccess = false;
        int  copper        = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_HOLDMONEY;

        if (copper < m_PlayerSirenConfigData._sirenConfigDataList[m_CurLevel]._growthCost)
        {
            //铜币不足
            UI.MessageBox.Instance.ShowTips(4, LanguageTextManager.GetString("IDS_H1_231"), 1f);
            return(false);
        }

        //int itemNum = UI.MainUI.ContainerInfomanager.Instance.GetItemNumber(m_PlayerSirenConfigData._sirenConfigDataList[m_CurLevel]._composeCost_itemID);
        //TraceUtil.Log("[炼妖物品]ID: " + m_PlayerSirenConfigData._sirenConfigDataList[m_CurLevel]._composeCost_itemID + " , number: " + itemNum);
        //if (itemNum < m_PlayerSirenConfigData._sirenConfigDataList[m_CurLevel]._composeCost_itemNum)
        //{
        //    //物品不足
        //    return;
        //}
        if (!IsMaxLevel())
        {
            int nextLevel = m_CurLevel + 1;
            TraceUtil.Log("NetServiceManager.Instance.EntityService.SendLianHua(" + m_PlayerSirenConfigData._sirenID + ", " + nextLevel);
            NetServiceManager.Instance.EntityService.SendLianHua(m_PlayerSirenConfigData._sirenID, nextLevel);
            isSendSuccess = true;
        }
        else
        {
            TraceUtil.Log("[妖女满级]");
        }

        return(isSendSuccess);
    }
Exemple #27
0
 public void RefreshItem()
 {
     Background_spriteSwith.ChangeSprite(5);
     IsRead_spring.gameObject.SetActive(!Convert.ToBoolean(_EamilItem.byState));
     IconPoint.ClearChild();
     fromLable.SetText(Encoding.UTF8.GetString(_EamilItem.szSendActorName));
     TitleLable.SetText(Encoding.UTF8.GetString(_EamilItem.szTitle));
     if (Convert.ToBoolean(_EamilItem.byIsSystem))
     {
         fromLable.gameObject.SetActive(false);
         FromSystem.gameObject.SetActive(true);
         var maildata = EmailInfoPanelManager.GetInstance().systemMailConfigDataBase.SystemMailConfigDataList.First(p => p.MailType == (int)_EamilItem.wEmailType);
         TitleLable.SetText(LanguageTextManager.GetString(maildata.MailTitle));
     }
     else
     {
         fromLable.gameObject.SetActive(true);
         FromSystem.gameObject.SetActive(false);
     }
     if (Convert.ToInt32(_EamilItem.byGoodsType) == (int)emEMAIL_EXTRA_TYPE.EMAIL_NONE_EXTRA_TYPE)
     {
         BaseIcon.gameObject.SetActive(true);
     }
     else
     {
         BaseIcon.gameObject.SetActive(false);
         ItemData data = ItemDataManager.Instance.GetItemData(System.Convert.ToInt32(_EamilItem.dwGoodsID));
         if (data != null)
         {
             Background_spriteSwith.ChangeSprite(data._ColorLevel + 1);
             NGUITools.AddChild(IconPoint.gameObject, data._picPrefab);
         }
     }
 }
Exemple #28
0
        public void Show(ItemFielInfo itemFielInfo)
        {
            Init();
            //transform.localPosition = new Vector3(-204,0,50);
            this.itemFielInfo = itemFielInfo;
            CreatItemPoint.ClearChild();
            GameObject skillIcon = NGUITools.AddChild(CreatItemPoint.gameObject, itemFielInfo.LocalItemData._picPrefab);

            skillIcon.transform.localScale = new Vector3(90, 90, 1);
            if (itemFielInfo.LocalItemData._GoodsClass == 2)
            {
                btnLabel.text = LanguageTextManager.GetString("IDS_I31_3");
                titleGoods.SetActive(true);
                titleEquip.SetActive(false);
            }
            else
            {
                btnLabel.text = LanguageTextManager.GetString("IDS_I31_1");
                titleEquip.SetActive(true);
                titleGoods.SetActive(false);
            }

            /*SingleContainerBox singleContainerBox = CreatObjectToNGUI.InstantiateObj(DragItemPrefab, CreatItemPoint).GetComponent<SingleContainerBox>();
             * singleContainerBox.collider.enabled = false;
             * singleContainerBox.gameObject.layer = 26;
             * singleContainerBox.gameObject.GetChildTransforms().ApplyAllItem(P => P.gameObject.layer = 26);
             * singleContainerBox.Background.ChangeSprite(0);
             * //singleContainerBox.ViewAtbButton.gameObject.SetActive(false);
             * singleContainerBox.Init(itemFielInfo, SingleContainerBoxType.HeroEquip);
             */
        }
Exemple #29
0
 private void DeleteEmailHandel(object obj)
 {
     LoadingUI.Instance.Close();
     MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_I22_20"), 1);
     EmailList = EmailDataManager.Instance.GetEmailList(_Type);
     StartRefreshList(false);
 }
Exemple #30
0
        void OnUseManaBtnClick(object obj)
        {
            SoundManager.Instance.PlaySoundEffect("Sound_Button_Tree_Buy");
            int  buyNum     = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_MAXMANNA_BUYNUM;
            bool CanBuyMana = buyNum < CommonDefineManager.Instance.CommonDefine.FruitMannan_CountMax;
            int  leftTime   = CommonDefineManager.Instance.CommonDefine.FruitMannan_CountMax - PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_MAXMANNA_BUYNUM;

            //TraceUtil.Log("是否可以继续购买仙露:" + PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_MAXMANNA_BUYNUM);
            if (CanBuyMana)                                                                                                                                                      //如果可以购买仙露
            {
                bool   CanBuy       = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PLAYER_FIELD_BINDPAY >= CommonDefineManager.Instance.CommonDefine.FruitMannan_Pay; //元宝是否足够
                string formatStr    = LanguageTextManager.GetString("IDS_I28_16").Replace("\\n", "\n");
                string ShowMsg      = string.Format(formatStr, CommonDefineManager.Instance.CommonDefine.FruitMannan_Count, leftTime);
                string sureBtnStr   = LanguageTextManager.GetString("IDS_H2_55");
                string cancelBtnStr = LanguageTextManager.GetString("IDS_H2_28");

                int A        = CommonDefineManager.Instance.CommonDefine.BuyFruitMannanConsumption1;
                int B        = CommonDefineManager.Instance.CommonDefine.BuyFruitMannanConsumption2;
                int C        = CommonDefineManager.Instance.CommonDefine.BuyFruitMannanConsumption3;
                int D        = CommonDefineManager.Instance.CommonDefine.BuyFruitMannanConsumption4;
                int buyTimes = buyNum / CommonDefineManager.Instance.CommonDefine.FruitMannan_Count + 1;
                int buyPrice = Mathf.FloorToInt((A * buyTimes * buyTimes + B * buyTimes + C) / (float)D) * D;

                MyParent.ShowCostMoneyMessageBox(CanBuy, EMessageCoinType.EGoldType, buyPrice, ShowMsg, sureBtnStr, cancelBtnStr, SendBuyAmritaToSever, null);
            }
            else
            {
                MessageBox.Instance.ShowTips(3, LanguageTextManager.GetString("IDS_H1_470"), 1);//超出购买上限提示
                SoundManager.Instance.PlaySoundEffect("Sound_Button_Tree_BuyFail");
            }
        }