public void SetTargetInfo() { UserInfo target = DataManager.instance.GetTarget(); if (target != null && target.user_id != 0) { TargetName.GetComponent <UILabel>().text = "공격 대상: " + target.name; TargetMoney.GetComponent <UILabel>().text = string.Format("보유 금액: {0}", UtilManager.GetCoinString(target.coin)); ulong Money = target.coin * LowData.master.DataInfoList[0].rewardrate / 100; AttackMoney.GetComponent <UILabel>().text = string.Format("약탈 금액: {0}", UtilManager.GetCoinString(Money)); ulong Cost = target.coin * LowData.master.DataInfoList[0].attackcoin / 100; if (LowData.master.DataInfoList[0].attackcoinlimit < Cost) { Cost = LowData.master.DataInfoList[0].attackcoinlimit; } AttackCost.GetComponent <UILabel>().text = string.Format("비용: {0}", UtilManager.GetCoinString(Cost)); } else { TargetName.GetComponent <UILabel>().text = "공격 대상: 선택 없음"; TargetMoney.GetComponent <UILabel>().text = "보유 금액: 정보 없음"; AttackMoney.GetComponent <UILabel>().text = "약탈 금액: 정보 없음"; AttackCost.GetComponent <UILabel>().text = "비용: 0"; } }
// Use this for initialization public void Success(int AddCoin, int BonusCoin) { ResultPopupDesc = GameObject.Find("ResultPopupDesc"); OKBtn = GameObject.Find("OKBtn"); UIEventListener.Get(OKBtn).onClick = OnClickOK; ResultPopupDesc.GetComponent <UILabel>().text = string.Format(SuccessText, UtilManager.GetCoinString((ulong)(AddCoin + BonusCoin)), UtilManager.GetCoinString((ulong)AddCoin), UtilManager.GetCoinString((ulong)BonusCoin)); }
public void SetInfo(UserInfo user, int ranking) { Info = user; Name.text = user.name; Coin.text = UtilManager.GetCoinString(user.coin); Ranking.text = ranking.ToString() + "."; SafeLv.text = "Lv." + user.safelv; LockLv.text = "Lv." + user.locklv; }
void ResetLevelInfo() { byte SafeLevel = DataManager.instance.GetSafeLv(); SafeLv.GetComponent <UILabel>().text = string.Format("금고 Lv {0:00}", SafeLevel); SafeCost.GetComponent <UILabel>().text = string.Format("{0}", UtilManager.GetCoinString(LowData.safeUpgrade.DataInfoDic[SafeLevel].cost)); MaxCoin.GetComponent <UILabel>().text = string.Format("최대 보유액 {0}", UtilManager.GetCoinString(LowData.safeUpgrade.DataInfoDic[SafeLevel].maxcoin)); byte LockLevel = DataManager.instance.GetLockLv(); LockLv.GetComponent <UILabel>().text = string.Format("자물쇠 Lv {0:00}", LockLevel); LockCost.GetComponent <UILabel>().text = string.Format("{0}", UtilManager.GetCoinString(LowData.lockUpgrade.DataInfoDic[LockLevel].cost)); MaxCount.GetComponent <UILabel>().text = string.Format("자물쇠 비밀번호 {0}자리", LowData.lockUpgrade.DataInfoDic[LockLevel].maxcount); LimitTime.GetComponent <UILabel>().text = string.Format("자물쇠 해제시간 {0:00}초", LowData.lockUpgrade.DataInfoDic[LockLevel].limittime); LimitValue.GetComponent <UILabel>().text = string.Format("자물쇠 해제회수 {0:00}회", LowData.lockUpgrade.DataInfoDic[LockLevel].limitvalue); }
public void SetInfo(GameLogInfo info, bool isAttack) { Info = info; string resString = string.Empty; if (isAttack && info.result == 1) { resString = "[66FA33]털기 성공"; Target.text = "대상 : " + DataManager.instance.GetRankName(info.target); Money.text = string.Format("빼앗은 금액 : {0}", UtilManager.GetCoinString(info.money)); } else if (isAttack && info.result == 0) { resString = "[FF0000]털기 실패"; Target.text = "대상 : " + DataManager.instance.GetRankName(info.target); Money.text = "빼앗은 금액 : 0"; } else if (!isAttack && info.result == 0) { resString = "[66FA33]금고 방어"; Target.text = "도둑 : " + DataManager.instance.GetRankName(info.attacker); Money.text = "빼앗긴 금액 : 0"; } else if (!isAttack && info.result == 1) { resString = "[FF0000]금고 털림"; Target.text = "도둑 : " + DataManager.instance.GetRankName(info.attacker); Money.text = string.Format("빼앗긴 금액 : {0}", UtilManager.GetCoinString(info.money)); } Result.text = "결과 : " + resString; }
void OnClickAttack(GameObject GO) { UserInfo target = DataManager.instance.GetTarget(); if (target == null || target.user_id == 0) { UIManager.instance.CreateOKPopup((int)eError.ERR_GAME_NOTARGET); return; } ulong Cost = target.coin * LowData.master.DataInfoList[0].attackcoin / 100; if (LowData.master.DataInfoList[0].attackcoinlimit < Cost) { Cost = LowData.master.DataInfoList[0].attackcoinlimit; } UIManager.instance.CreateYNPopup(string.Format("{0} 금액을 소모하여 금고를\n\n터시겠습니까?", UtilManager.GetCoinString(Cost)), eYNPopup.ATTACK); }
public void SetInfo() { Name.GetComponent <UILabel>().text = DataManager.instance.GetName(); Coin.GetComponent <UILabel>().text = UtilManager.GetCoinString(DataManager.instance.GetCoin()); }