public void Refresh(FateSaleFiexdVo saleValue) { lb_salename.text = saleValue.title; lb_salepayment.text = Mathf.Abs(saleValue.payment).ToString(); lb_salemortgage.text = Mathf.Abs(saleValue.mortgage).ToString(); lb_salemoeny.text = saleValue.saleMoney.ToString(); var tmpStr = ""; if (saleValue.changeMoney > 0) { tmpStr = string.Format(_greenText, saleValue.changeMoney); lb_salechangeMoney.text = tmpStr; } else if (saleValue.changeMoney < 0) { tmpStr = string.Format(_redText, saleValue.changeMoney); lb_salechangeMoney.text = tmpStr; } else { lb_salechangeMoney.text = saleValue.changeMoney.ToString(); } if (saleValue.income > 0) { tmpStr = string.Format(_greenText, saleValue.income); lb_saleincome.text = tmpStr; } else if (saleValue.income < 0) { tmpStr = string.Format(_redText, saleValue.income); lb_saleincome.text = tmpStr; } else { lb_saleincome.text = saleValue.income.ToString(); } if (saleValue.quality > 0) { tmpStr = string.Format(_greenText, saleValue.quality); lb_salequality.text = tmpStr; } else if (saleValue.quality < 0) { tmpStr = string.Format(_redText, saleValue.quality); lb_salequality.text = tmpStr; } else { lb_salequality.text = saleValue.quality.ToString(); } _saleFixedVo = saleValue; }
private void _InitSetFateData() { _saleFixedList.Clear(); _netSaleList.Clear(); var saleVo = new FateSaleFiexdVo(); var heroInfor = playerInfor; // var template = MetadataManager.Instance.GetTemplateTable<ChanceFixed> (); // var it = template.GetEnumerator (); // while (it.MoveNext ()) // { // var value = it.Current.Value as ChanceFixed; // if(value.id==40002 || value.id==20003 ||value.id == 20001) // { // heroInfor.chanceFixedCardList.Add (value); // } // } // template = MetadataManager.Instance.GetTemplateTable<ChanceShares> (); // it = template.GetEnumerator (); // while(it.MoveNext()) // { // var value = it.Current.Value as ChanceShares; // // if (value.id == 30001) // { // Console.WriteLine ("添加股票信息"); // heroInfor.shareCardList.Add (value); // } // // } for (var i = 0; i < heroInfor.chanceFixedCardList.Count; i++) { var fixedVo = heroInfor.chanceFixedCardList[i]; if (fixedVo.id == cardData.relateID) { saleVo = new FateSaleFiexdVo(); saleVo.title = fixedVo.title; saleVo.payment = fixedVo.payment; // saleVo.mortgage = fixedVo.mortgage * fixedVo.baseNumber ; saleVo.mortgage = fixedVo.mortgage; saleVo.saleMoney = cardData.payment; saleVo.changeMoney = saleVo.saleMoney * fixedVo.baseNumber + saleVo.mortgage; saleVo.income = -fixedVo.income; saleVo.quality = -fixedVo.scoreNumber; saleVo.id = fixedVo.id; saleVo.baseNum = fixedVo.baseNumber; _saleFixedList.Add(saleVo); } } for (var i = 0; i < heroInfor.opportCardList.Count; i++) { var opprtuniyvo = heroInfor.opportCardList[i]; if (opprtuniyvo.id == cardData.relateID) { saleVo = new FateSaleFiexdVo(); saleVo.title = opprtuniyvo.title; saleVo.payment = opprtuniyvo.payment; // saleVo.mortgage = opprtuniyvo.mortgage * opprtuniyvo.baseNumber ; saleVo.mortgage = opprtuniyvo.mortgage; saleVo.saleMoney = cardData.payment; saleVo.changeMoney = saleVo.saleMoney * opprtuniyvo.baseNumber + saleVo.mortgage; saleVo.income = -opprtuniyvo.income; saleVo.quality = 0; saleVo.id = opprtuniyvo.id; saleVo.baseNum = opprtuniyvo.baseNumber; _saleFixedList.Add(saleVo); } } }