Exemplo n.º 1
0
        private void _OnShowFront()
        {
            EventTriggerListener.Get(btn_close.gameObject).onClick += _OnCloseFrontContent;

            var tmpstr   = "";
            var iconPath = "";

            if (_controller.recordType == TargetInnerRecordType.Flow)
            {
                tmpstr   = HandleStringTool.HandleMoneyTostring(_controller.playerInfor.CurrentIncome);
                iconPath = "share/atlas/battle/totalinfor/targetinner/liudongxianjin.ab";
            }
            else if (_controller.recordType == TargetInnerRecordType.Time)
            {
                tmpstr   = _controller.playerInfor.timeScore.ToString();
                iconPath = "share/atlas/battle/totalinfor/targetinner/shijianjifen.ab";
            }
            else if (_controller.recordType == TargetInnerRecordType.Quality)
            {
                tmpstr   = _controller.playerInfor.qualityScore.ToString();
                iconPath = "share/atlas/battle/totalinfor/targetinner/pinzhijifen.ab";
            }

            lb_num.text = tmpstr;
            img_icon.Load(iconPath);
            if (null != img_recorditem)
            {
                _CreateTimeWrapGrid(img_recorditem.gameObject);
            }
        }
Exemplo n.º 2
0
        public void InitBorrowRecord()
        {
            var canBorrowStr = HandleStringTool.HandleMoneyTostring(_playerInfor.GetTotalBorrowBank() + _playerInfor.GetTotalBorrowCard() - _playerInfor.bankIncome - _playerInfor.creditIncome);

            if (GameModel.GetInstance.isPlayNet == true)
            {
                canBorrowStr = _playerInfor.netRecordCanBorrow.ToString();
            }
            lb_canborrow.text = canBorrowStr;

            var limitTxt = HandleStringTool.HandleMoneyTostring(_playerInfor.GetTotalBorrowBank() + _playerInfor.GetTotalBorrowCard());

            if (GameModel.GetInstance.isPlayNet == true)
            {
                limitTxt = _playerInfor.netRecordLimitBorrow.ToString();
            }
            lb_limit.text = limitTxt;

            var alreayTxt = HandleStringTool.HandleMoneyTostring(_playerInfor.bankIncome + _playerInfor.creditIncome);

            if (GameModel.GetInstance.isPlayNet == true)
            {
                alreayTxt = _playerInfor.netRecordAlreadyBorrow.ToString();
            }
            lb_already.text = alreayTxt;

            _CreateWrapGrid(img_recordImg.gameObject);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 增加玩家的借贷信息
        /// </summary>
        private void _OnUpdateInfor()
        {
            lb_curborrow.text   = HandleStringTool.HandleMoneyTostring(curborrow);
            lb_curdebt.text     = HandleStringTool.HandleMoneyTostring(curdebt);
            lb_totalborrow.text = HandleStringTool.HandleMoneyTostring(curborrow + totalborrow);
            lb_totaldebt.text   = HandleStringTool.HandleMoneyTostring(curdebt + totaldebt);

            _inputMoenyTxt.text = curborrow.ToString();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 设置显示人物信息
        /// </summary>
        /// <param name="player"></param>
        public void SetCardData(PlayerInfo player)
        {
            lb_income.text     = HandleStringTool.HandleMoneyTostring(player.totalMoney);
            lb_timetxt.text    = string.Format("{0}/{1}", player.timeScore.ToString(), "1000");
            lb_qualitytxt.text = string.Format("{0}/{1}", player.qualityScore.ToString(), "100");

            lb_name.text = player.playerName;

            if (null != imgRole)
            {
                imgRole.Load(player.playerImgPath);
            }
        }
Exemplo n.º 5
0
        public void SetCashFlow(float value, int tarscore = -1, bool mUpdate = true)
        {
            if (playerCurretMoney <= 0)
            {
                playerCurretMoney = value;
            }
            else
            {
                if (playerCurretMoney < value)
                {
//					var _initWorldPosition = Room.Instance.GetCurrentPlayerByIndex(0).getPlayPos ().position;
//					var tmpPosition =Camera.main.WorldToScreenPoint(new Vector3(_initWorldPosition.x,_initWorldPosition.y+2,_initWorldPosition.z));

                    UIControllerManager.Instance.GetController <UIGameEffectController> ().AddMoneyEffect(0, new Vector3(0, 0, 0));

                    if (mUpdate == true)
                    {
                        var controller = UIControllerManager.Instance.GetController <UISpecialeffectsWindowController> ();
                        controller.mStart = true;
                        if (null != Room.Instance.getCurrentPlay())
                        {
                            controller.SetHeadText(Room.Instance.getCurrentPlay().getPlayPos(), value - playerCurretMoney);
                        }
                    }
                }
                else if (playerCurretMoney > value)
                {
                    if (mUpdate == true)
                    {
                        var controller = UIControllerManager.Instance.GetController <UISpecialeffectsWindowController> ();
                        controller.mStart = true;

                        if (null != Room.Instance.getCurrentPlay())
                        {
                            controller.SetHeadText(Room.Instance.getCurrentPlay().getPlayPos(), value - playerCurretMoney);
                        }
                    }
                }

                playerCurretMoney = value;
            }

            var tmpStr = HandleStringTool.HandleMoneyTostring(value);

            _lbCashFlow.SetTextEx(tmpStr);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 在显示银行贷款时,初始化的信息
        /// </summary>
        public void OnShowBorrowBank()
        {
            if (GameGuidManager.GetInstance.DoneGameBorrow == false)
            {
                GameGuidManager.GetInstance.ShowBorrowGuid();
            }

            if (GameModel.GetInstance.isPlayNet == false)
            {
                canborrow   = _playerInfor.GetTotalBorrowBank();
                totalborrow = _playerInfor.bankIncome;
                totaldebt   = _playerInfor.bankLoans;
            }
            else
            {
                canborrow   = _playerInfor.netBorrowBoardBankCanBorrow;
                totalborrow = _playerInfor.netBorrowBoardBankTotalBorrow;
                totaldebt   = _playerInfor.netBorrowBoradBankTotalDebt;
            }

            _HandlerNumLength(canborrow);

            lb_min.text = "0";

            var canBorrowMoney = 0f;

            if (GameModel.GetInstance.isPlayNet == false)
            {
                canBorrowMoney = canborrow - totalborrow;
            }
            else
            {
                canBorrowMoney = canborrow;
            }
            lb_max.text           = HandleStringTool.HandleMoneyTostring(canBorrowMoney);
            lb_canborrow.text     = HandleStringTool.HandleMoneyTostring(canBorrowMoney);
            _rangeSlider.minValue = 0;
            _rangeSlider.maxValue = (canBorrowMoney) / _numLength;
            _sliderCurrentValue   = 0;
            _rangeSlider.value    = _sliderCurrentValue;
            _OnUpdateInfor();
            _rangeSlider.onValueChanged.AddListener(_OnSliderValueChange);
            _inputMoenyTxt.onEndEdit.AddListener(_OnInputChange);
        }
Exemplo n.º 7
0
        protected override void _OnShow()
        {
//			MoveIn ();

            EventTriggerListener.Get(btn_record.gameObject).onClick += _OnShowRecordBoard;

            var playerInfor = _controller.playerInfor;

            var tmpIncome = 0f;

            if (GameModel.GetInstance.isPlayNet == false)
            {
                tmpIncome = playerInfor.TargetIncome - playerInfor.CurrentIncome;
                if (tmpIncome <= 0)
                {
                    tmpIncome = 0;
                }
            }
            else
            {
                tmpIncome = playerInfor.totalIncome;
            }


            lb_income.text = HandleStringTool.HandleMoneyTostring(tmpIncome);

//			img_pig.fillAmount = playerInfor.CurrentIncome / playerInfor.TargetIncome;

            content_front.SetActiveEx(false);

            if (_controller.GetTimeScoreList().Count <= 0 && _controller.GetQualityScoreList().Count <= 0)
            {
//				btn_record.SetActiveEx (false);
                btn_record.enabled     = false;
                btn_record.image.color = btnbgColor;
            }
            else
            {
                btn_record.enabled = true;
                //btn_record.enabled = false;
            }
        }
Exemplo n.º 8
0
        public void SetCardData(PlayerInfo player)
        {
            lb_incomeDesc.text  = string.Format("当前\"{0}\"", "<color=#e94444>非劳务收入</color>");
            lb_timeDesc.text    = string.Format("当前\"{0}\"", "<color=#e94444>时间积分</color>");
            lb_qualityDesc.text = string.Format("当前\"{0}\"", "<color=#e94444>品质积分</color>");

            lb_incomequal.text   = string.Format("x {0} =", "<color=#e94444>100</color>");
            lb_timenqual.text    = string.Format("x {0} =", "<color=#e94444>100</color>");
            lb_qualtyenqual.text = string.Format("x {0} =", "<color=#e94444>10</color>");


            lb_income.text       = player.totalIncome.ToString();
            lb_incometarget.text = HandleStringTool.HandleMoneyTostring(player.totalIncome * 100);

            lb_timetxt.text    = player.timeScore.ToString();
            lb_timetarget.text = (player.timeScore * 100).ToString();

            lb_qualitytxt.text    = player.qualityScore.ToString();
            lb_qualitytarget.text = (player.qualityScore * 10).ToString();
        }
Exemplo n.º 9
0
        private void _ShowQualityLifeCardData(QualityLife go, string imgPath)
        {
            lb_cardName.text = go.title;

//			lb_cardTitle.text = go.title;
            if (go.desc == null || go.desc == "")
            {
                lb_desc.SetActiveEx(false);
            }
            else
            {
                var str  = go.desc;
                var str1 = str.Replace("\\u3000", "\u3000");
                var str2 = str1.Replace("\\n", "\n");
                lb_desc.text = str2;
            }

            var tmpPay = HandleStringTool.HandleMoneyTostring(Mathf.Abs(go.payment));
            var tmpStr = "¥ {0}";

//			if (go.payment < 0)
//			{
//				tmpStr="¥ -{0}";
//			}


            lb_paymenyTxt.text = string.Format(tmpStr, tmpPay);

            lb_timeTxt.text = go.timeScore.ToString();

            lb_qualityTxt.text = string.Concat(go.qualityScore);

            if ("" != imgPath)
            {
                if (null != _cardPic)
                {
                    _cardPic.Load(imgPath);
                }
            }
        }
Exemplo n.º 10
0
        public void SetCardId(int id)
        {
            _cardID = id;

            var tmpCard = new SpecialCard();

            if (GameModel.GetInstance.isPlayNet == true)
            {
                tmpCard = GameModel.GetInstance.netSpecialCard;
            }
            else
            {
                var tmplate = MetadataManager.Instance.GetTemplateTable <SpecialCard> ();
                var it      = tmplate.GetEnumerator();
                while (it.MoveNext())
                {
                    var value = it.Current.Value as SpecialCard;
                    if (value.id == id)
                    {
                        tmpCard = value;
                        //	isGetCard=true;
                        break;
                    }
                }
            }



            if ((int)SpecialCardType.CharityType == id)
            {
                // 慈善事业
                cardTitle     = SubTitleManager.Instance.subtitle.cardCharity;
                cardTitlePath = CardTitlePath.Special_Charity;

                var payMoney = player.cashFlow + player.totalIncome + player.innerFlowMoney;

                cardInfor = string.Format(tmpCard.desc, HandleStringTool.HandleMoneyTostring((int)(payMoney * 0.1f)));
                cardPath  = tmpCard.cardPath;

                portType = Protocol.Game_BuyCharityCard;
            }
            else if ((int)SpecialCardType.CheckDayType == id)
            {
                // 结账日

                cardTitle     = tmpCard.title;
                cardTitlePath = CardTitlePath.Special_CheckDay;

                var checkoutMoney = (player.cashFlow + player.totalIncome + player.innerFlowMoney - player.MonthPayment);
//				var paymentmoney =HandleStringTool.HandleMoneyTostring( player.MonthPayment);
//				var incomeMoney = HandleStringTool.HandleMoneyTostring(player.cashFlow + player.totalIncome + player.innerFlowMoney);

                if (GameModel.GetInstance.isPlayNet == true)
                {
                    checkoutMoney = player.netCheckDayNum;
                }

                var tmpcheckstr = HandleStringTool.HandleMoneyTostring(checkoutMoney);

                cardInfor = string.Format(tmpCard.desc, tmpcheckstr);
                cardPath  = tmpCard.cardPath;

                portType = Protocol.Game_BuyCheckDayCard;
            }
            else if ((int)SpecialCardType.InnerCheckDayType == id)
            {
                cardTitle     = tmpCard.title;
                cardTitlePath = CardTitlePath.Special_CheckDay;

                var checkoutMoney = (player.cashFlow + player.totalIncome + player.innerFlowMoney - player.MonthPayment);
                if (GameModel.GetInstance.isPlayNet == true)
                {
                    checkoutMoney = player.netCheckDayNum;
                }

                var tmpcheckstr = HandleStringTool.HandleMoneyTostring(checkoutMoney);

                cardInfor = string.Format(tmpCard.desc, tmpcheckstr, tmpcheckstr);

                cardPath = tmpCard.cardPath;

                portType = Protocol.Game_BuyCheckDayCard;
            }
            else if ((int)SpecialCardType.GiveChildType == id)
            {
                // 生孩子
                cardTitle     = SubTitleManager.Instance.subtitle.cardGetChild;
                cardTitlePath = CardTitlePath.Special_GiveChild;

                var tmpChildNum = player.childNum;

                if (GameModel.GetInstance.isPlayNet == false)
                {
                    if (tmpChildNum >= player.childNumMax)
                    {
                        var tmpMoney = (int)(player.totalMoney * 0.1f);

                        if (tmpMoney < 0)
                        {
                            tmpMoney = 0;
                        }

                        cardPath  = tmpCard.cardPath;
                        cardInfor = string.Format(SubTitleManager.Instance.subtitle.moreChildForBoard, player.childNumMax.ToString(), tmpMoney.ToString());
                        return;
                    }
                }
                else
                {
                    if (GameModel.GetInstance.isGiveChild == 1)
                    {
                        var tmpMoney = (int)(player.totalMoney * 0.1f);
                        if (tmpMoney < 0)
                        {
                            tmpMoney = 0;
                        }
                        cardPath  = tmpCard.cardPath;
                        cardInfor = string.Format(SubTitleManager.Instance.subtitle.moreChildForBoard, player.childNumMax.ToString(), tmpMoney.ToString());
                        return;
                    }
                }



                tmpChildNum += 1;

                if (tmpChildNum > player.childNumMax)
                {
                    tmpChildNum = player.childNumMax;
                }
                cardInfor = string.Format(tmpCard.desc, tmpChildNum.ToString(), (tmpChildNum * player.oneChildPrise).ToString());
                cardPath  = tmpCard.cardPath;

                portType = Protocol.Game_BuyGiveChildCard;
            }
            else if ((int)SpecialCardType.HealthType == id || (int)SpecialCardType.InnerHealthType == id)
            {
                // 外圈健康管理 内圈健康管理
                cardTitle     = SubTitleManager.Instance.subtitle.cardHealth;
                cardTitlePath = CardTitlePath.Special_Health;

                var payMoney = player.cashFlow + player.totalIncome + player.innerFlowMoney;
                cardInfor = string.Format(tmpCard.desc, HandleStringTool.HandleMoneyTostring(((int)(payMoney * 0.1f))));
                cardPath  = tmpCard.cardPath;

                portType = Protocol.Game_BuyHealthCard;
            }
            else if ((int)SpecialCardType.InnerStudyType == id || (int)SpecialCardType.StudyType == id)
            {
                // 进修学习 和外圈进修学习
                cardTitle     = SubTitleManager.Instance.subtitle.cardStudy;
                cardTitlePath = CardTitlePath.Special_Study;

                var payMoney = player.cashFlow + player.totalIncome + player.innerFlowMoney;
                Console.WriteLine("dddddddddddddd" + tmpCard.desc);
                cardInfor = string.Format(tmpCard.desc, HandleStringTool.HandleMoneyTostring((int)(payMoney * 0.1f)));
                cardPath  = tmpCard.cardPath;
                portType  = Protocol.Game_BuyStudyCard;
            }
        }
Exemplo n.º 11
0
        private void _ShowQualityLifeCardData(Investment go, string imgPath)
        {
            lb_cardname.text  = go.title;
            lb_cardTitle.text = go.title;
            lb_cardTitle.SetActiveEx(false);
            if (go.desc == null || go.desc == "")
            {
                lb_desc.SetActiveEx(false);
            }
            else
            {
                var str  = go.desc;
                var str1 = str.Replace("\\u3000", "\u3000");
                var str2 = str1.Replace("\\n", "\n");
                lb_desc.text = str2;
//				lb_desc.text = go.desc;
            }

            var tmpPay = HandleStringTool.HandleMoneyTostring(Mathf.Abs(go.payment * _controller.castRate));

            lb_paymenyTxt.text = string.Format("¥ {0}", tmpPay);

            lb_timeName.SetActiveEx(false);
            lb_timeTxt.SetActiveEx(false);

            //if (go.timeScore == 0)
            //{
            //	lb_timeName.SetActiveEx (false);
            //	lb_timeTxt.SetActiveEx (false);
            //} else
            //{
            //	lb_timeTxt.text = string.Concat (go.timeScore);
            //}

            if (null == go.profit || go.profit == "")
            {
                lb_profitName.SetActiveEx(false);
                lb_profitTxt.SetActiveEx(false);
            }
            else
            {
                var tmpProfit = "";
                if (GameModel.GetInstance.isPlayNet == false)
                {
                    var tmpValue = float.Parse(go.profit);
                    tmpProfit = string.Format("{0}%", (tmpValue * 100).ToString());
                }
                else
                {
                    tmpProfit = go.profit;
                }

                lb_profitTxt.text = tmpProfit;
            }

            if (go.income == 0)
            {
                lb_incomeName.SetActiveEx(false);
                lb_incometxt.SetActiveEx(false);
            }
            else
            {
                lb_incometxt.text = string.Concat(go.income);
            }

            if ("" != imgPath)
            {
                if (null != _cardPic)
                {
                    _cardPic.Load(imgPath);
                }
            }
        }
Exemplo n.º 12
0
        private void _SetOpportunityData(Opportunity go, string imgPath)
        {
            lb_cardname.text = go.title;

            var str  = go.desc;
            var str1 = str.Replace("\\u3000", "\u3000");
            var str2 = str1.Replace("\\n", "\n");

            lb_desc.text = str2;
//			lb_desc.text = go.desc;
            lb_coastTxt.text = HandleStringTool.HandleMoneyTostring(go.cost);
            lb_saleTxt.text  = go.sale;
            //lb_paymentTxt.text = String.Format ("{0:0} ",Math.Abs (go.payment));
            lb_paymentTxt.text = "¥ " + HandleStringTool.HandleMoneyTostring(Mathf.Abs(go.payment));

            if (GameModel.GetInstance.isPlayNet == false)
            {
                if (null == go.profit || go.profit == "")
                {
                    lb_profitNameTxt.SetActiveEx(false);
                }
                else
                {
                    var tmpProfit = float.Parse(go.profit);
                    lb_profitTxt.text = string.Format("{0}%", (tmpProfit * 100).ToString());
                }
            }
            else
            {
                if (null == go.profit || go.profit == "")
                {
                    lb_profitNameTxt.SetActiveEx(false);
                }
                else
                {
                    lb_profitTxt.text = go.profit;
                }
            }

            lb_mortgageTxt.text = "¥ " + HandleStringTool.HandleMoneyTostring(Math.Abs(go.mortgage));
            lb_incomeTxt.text   = "¥ " + Math.Abs(go.income);

            if (go.mortgage == 0)
            {
                lb_mortgageNameTxt.SetActiveEx(false);
            }

            if (go.income == 0)
            {
                lb_incomeNameTxt.SetActiveEx(false);
            }


            lb_qualityName.SetActiveEx(false);
            lb_qualityTxt.SetActiveEx(false);
            lb_qualityDescTxt.SetActiveEx(false);

            if ("" != imgPath)
            {
                if (null != _cardPic)
                {
                    _cardPic.Load(imgPath);
                }
            }
        }
Exemplo n.º 13
0
        private void SetContent(Investment value)
        {
            _txtLbcardname.text = value.title;

            _txtTitle.text = value.title;
            _txtTitle.SetActiveEx(false);

            if (value.desc == null || value.desc == "")
            {
                _txtDesc.SetActiveEx(false);
            }
            else
            {
                var str  = value.desc;
                var str1 = str.Replace("\\u3000", "\u3000");
                var str2 = str1.Replace("\\n", "\n");
                _txtDesc.text = str2;
            }

            var tmpPay = HandleStringTool.HandleMoneyTostring(Mathf.Abs(value.payment));

            _txtPayment.text = string.Format("¥ {0}", tmpPay);

            _txtTimescore.SetActiveEx(false);
            _txtTimeName.SetActiveEx(false);
            if (null == value.profit || value.profit == "")
            {
                _txtProfitName.SetActiveEx(false);
                _txtProfit.SetActiveEx(false);
            }
            else
            {
                var tmpProfit = "";

                if (GameModel.GetInstance.isPlayNet == false)
                {
                    var tmpValue = float.Parse(value.profit);
                    tmpProfit = string.Format("{0}%", (tmpValue * 100).ToString());
                }
                else
                {
                    tmpProfit = value.profit;
                }

                _txtProfit.text = tmpProfit;
            }

            if (value.income == 0)
            {
                _txtIncomeName.SetActiveEx(false);
                _txtIncome.SetActiveEx(false);
            }
            else
            {
                _txtIncome.text = string.Concat(value.income);
            }

            WebManager.Instance.LoadWebItem(value.cardPath, item => {
                using (item)
                {
                    _imgShowImage.sprite = item.sprite;
                }
            });
        }
Exemplo n.º 14
0
        private void _OnShowCenter()
        {
//			MoveIn ();

            EventTriggerListener.Get(btn_checkRecord.gameObject).onClick += _OnShowStateRecord;

            //btn_checkRecord.SetActiveEx(false);

            var player = _controller.playerInfor;

            if (null != player)
            {
                if (player.isEnterInner == true)
                {
//					img_tmpAdd.rectTransform.sizeDelta = new Vector2 (addWithSize, addWithSize);
//					img_income.Load (incomeInnerPath);
//					img_payment.Load (payInnerPath);
//					img_checkout.Load (checkoutInnerPath);
//					img_add.Load (addInnerPath);

                    var totalIncome = player.innerFlowMoney;
                    if (GameModel.GetInstance.isPlayNet == true)
                    {
                        totalIncome = player.netInforCheckVo.totalIncome;
                    }
                    lb_income.text = string.Format(_greenText, HandleStringTool.HandleMoneyTostring(totalIncome));

                    var totalDebt = player.MonthPayment;
                    if (GameModel.GetInstance.isPlayNet == true)
                    {
                        totalDebt = player.netInforCheckVo.totalPay;
                    }
                    lb_payment.text = string.Format(_redText, HandleStringTool.HandleMoneyTostring(totalDebt));

                    //player.CurrentIncome + player.innerFlowMoney
                    var tmpIncome = totalIncome - totalDebt;
                    if (GameModel.GetInstance.isPlayNet == true)
                    {
                        tmpIncome = player.netCheckDayNum;
                    }

                    lb_checkout.text = string.Format(_greenText, HandleStringTool.HandleMoneyTostring(tmpIncome));
                }
                else
                {
                    var totalIncome = (player.CurrentIncome + player.cashFlow);
                    if (GameModel.GetInstance.isPlayNet == true)
                    {
                        totalIncome = player.netInforCheckVo.totalIncome;
                    }
                    lb_income.text = string.Format(_greenText, totalIncome.ToString());


                    var totalDebt = player.MonthPayment;
                    if (GameModel.GetInstance.isPlayNet == true)
                    {
                        totalDebt = player.netInforCheckVo.totalPay;
                    }
                    lb_payment.text = string.Format(_redText, totalDebt.ToString());

                    //player.CurrentIncome + player.cashFlow - player.MonthPayment
                    lb_checkout.text = string.Format(_greenText, (totalIncome - totalDebt).ToString());
                }
            }
        }
Exemplo n.º 15
0
        protected override void _OnShow()
        {
//			MoveIn ();

            if (null != _controller)
            {
                if (null != _controller.playerInfor)
                {
                    var player = _controller.playerInfor;
                    _heroImg.Load(player.playerImgPath);

                    lb_name.text   = player.playerName;
                    lb_age.text    = player.totalAge.ToString();
                    lb_career.text = player.career;
//					var tmpstr = HandleStringTool.HandleMoneyTostring (player.totalMoney);
                    var tmpstr = player.totalMoney.ToString();
                    lb_moeny.text = string.Format(_greenText, tmpstr);

                    var tmpBalance = 0f;
                    if (GameModel.GetInstance.isPlayNet == false)
                    {
                        if (player.capitalList.Count > 0)
                        {
                            tmpBalance = player.capitalList[player.capitalList.Count - 1].captical;
                        }
                    }
                    else
                    {
                        tmpBalance = player.netTotalBalanceMoney;
                    }


                    lb_balance.text = string.Format(_greenText, HandleStringTool.HandleMoneyTostring(tmpBalance));
                    //HandleStringTool.HandleMoneyTostring (player.GetTotalDebt ());
                    var totaldebt = 0;
                    if (GameModel.GetInstance.isPlayNet == false)
                    {
                        totaldebt = player.GetTotalDebt();
                    }
                    else
                    {
                        totaldebt = player.netTotalDebtMoney;
                    }
                    lb_debt.text = totaldebt.ToString();



                    lb_nonIncome.text    = string.Format(_greenText, player.CurrentIncome.ToString());
                    lb_totalIncome.text  = string.Format(_greenText, (player.CurrentIncome + player.innerFlowMoney + player.cashFlow).ToString());
                    lb_timeScore.text    = player.timeScore.ToString();
                    lb_qualityScore.text = player.qualityScore.ToString();

                    if (player.isEnterInner == false)
                    {
                        lb_totalPaymeny.text = HandleStringTool.HandleMoneyTostring(player.MonthPayment);
                    }
                    else
                    {
                        lb_totalPaymeny.text = HandleStringTool.HandleMoneyTostring(player.MonthPayment);
                    }

                    lb_totalmoney.text = string.Format(_greenText, (player.CurrentIncome + player.innerFlowMoney + player.cashFlow - player.MonthPayment).ToString());


                    if (player.isEnterInner == false)
                    {
                        lb_balance.SetActiveEx(true);
                        lb_debt.SetActiveEx(true);

                        lb_nonIncome.SetActiveEx(true);
                        lb_totalIncome.SetActiveEx(true);
                        lb_debt.SetActiveEx(true);
                    }
                    else
                    {
                        lb_balance.SetActiveEx(false);
                        lb_debt.SetActiveEx(false);

                        lb_nonIncome.SetActiveEx(false);
                        lb_totalIncome.SetActiveEx(false);
                        lb_debt.SetActiveEx(false);
                    }
                }
            }
        }
Exemplo n.º 16
0
 /// <summary>
 /// 显示金币数
 /// </summary>
 /// <param name="value"></param>
 public void OnShowNumTxt(float value)
 {
     lb_shownumTxt.text = HandleStringTool.HandleMoneyTostring(value);
 }