private void CurrScoreCounter(int iCurrScore) { // 계산되는 값이 손실범위를 넘어서면 원래값으로. if (iCurrScore >= _roundToInt) { iCurrScore = (int)_score; } string strScore = string.Empty; strScore = UtilFunc.CurrencyFormat(iCurrScore); _currentScore.text = string.Format(StringTableManager.GetData(3411), strScore); }
//=================================================================================== // // Method // //=================================================================================== public void Init(EnterPopupType type, ulong Dia) { _redBackSprite.gameObject.SetActive(false); _grayBackSprite.gameObject.SetActive(false); _CancleButtonLabel.text = StringTableManager.GetData(3); // 3 취소. _WealthCountLabel.text = string.Format(StringTableManager.GetData(6561), UtilFunc.CurrencyFormat(UserInfo.Instance.iDiaCount)); // 6561 {0}개 보유중 switch (type) { case EnterPopupType.pvpEnter: { UIEventListener.Get(_EnteranceButton).onClick -= OnEnterance; UIEventListener.Get(_EnteranceButton).onClick = OnEnterance; _TitleLabel.text = StringTableManager.GetData(8286); // 8286 즉시 입장 안내 // 8287 결투장 열쇠가 부족합니다.\n다이아몬드 {0}개를 소모하여 즉시 입장할 수 있습니다.\n즉시 입장하시겠습니까? _ContentLabel.text = string.Format(StringTableManager.GetData(8287), Dia); _EnteranceButtonLabel.text = StringTableManager.GetData(8285); // 8285 즉시 입장 _EnteranceButtonDiaCountLabel.text = Dia.ToString(); _redBackSprite.gameObject.SetActive(true); } break; case EnterPopupType.ReGacha: { UIEventListener.Get(_EnteranceButton).onClick -= OnReGacha; UIEventListener.Get(_EnteranceButton).onClick = OnReGacha; _TitleLabel.text = StringTableManager.GetData(4300); // 8777 다시 소환하시겠습니까? _ContentLabel.text = StringTableManager.GetData(8777); _EnteranceButtonLabel.text = StringTableManager.GetData(8775); // 8775 다시 소환 _EnteranceButtonDiaCountLabel.text = Dia.ToString(); _grayBackSprite.gameObject.SetActive(true); } break; } }
//=================================================================================== // // Method // //=================================================================================== public void SetResultData(_stGuildRaidBattleResultAck resultData) { GuildRaidInfo guildRaidInfo = UserInfo.Instance.guildRaidInfo; DATA_GUILDRAID guildRaidTable = CDATA_GUILDRAID.Get(guildRaidInfo.guildRaidType); if (guildRaidTable == null) { #if DEBUG_LOG Debug.Log(string.Format("<color=red> GUILDRAID Table Error - guildRaidType : {0} </color>", guildRaidInfo.guildRaidType)); #endif return; } _easyIconLabel.text = StringTableManager.GetData(81); // 81 쉬움 _nomalIconLabel.text = StringTableManager.GetData(82); // 82 보통 _hardIconLabel.text = StringTableManager.GetData(83); // 83 어려움 _easyIcon.gameObject.SetActive(false); _nomalIcon.gameObject.SetActive(false); _hardIcon.gameObject.SetActive(false); if (guildRaidTable.SetLevel == (int)enGuildRaidDifficulty.Easy) { _easyIcon.gameObject.SetActive(true); } else if (guildRaidTable.SetLevel == (int)enGuildRaidDifficulty.Normal) { _nomalIcon.gameObject.SetActive(true); } else if (guildRaidTable.SetLevel == (int)enGuildRaidDifficulty.Hard) { _hardIcon.gameObject.SetActive(true); } //_bossLevel.gameObject.SetActive(false); // 레벨없음 _bossBannerSprite.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_GUILDRAID, guildRaidTable.RaidBannerImage); _titleLabel.text = StringTableManager.GetData(6753); // 6753 길드 레이드 _bossName.text = StringTableManager.GetData(guildRaidTable.RaidBossName); _currentScore.text = string.Format(StringTableManager.GetData(3411), 0); _totalScore.text = string.Format(StringTableManager.GetData(3411), UtilFunc.CurrencyFormat((int)(guildRaidInfo.guildRaidScore + resultData.kAddScore))); _moveMainMenuButtonLabel.text = StringTableManager.GetData(133); _moveGuildRaidLabel.text = StringTableManager.GetData(6753); // 6753 길드 레이드 _moveGuildRaidReadyLabel.text = StringTableManager.GetData(135); _guildRaidTicketLabel.text = string.Format(StringTableManager.GetData(4918), resultData.kUpdatePlayCount); if (UserInfo.Instance.GuildRaidTicket < 1) { Vector3 OriginPos = _moveMainMenuButton.transform.localPosition; _moveMainMenuButton.transform.localPosition = new Vector3(-150.0f, OriginPos.y, OriginPos.z); OriginPos = _moveGuildRaid.transform.localPosition; _moveGuildRaid.transform.localPosition = new Vector3(150.0f, OriginPos.y, OriginPos.z); _moveGuildRaidReady.gameObject.SetActive(false); } // ulog -> float -> (ulog or int) 손실발생. 그래서 저장. float Round = Mathf.Round(resultData.kAddScore); // ulong -> float _roundToInt = Mathf.RoundToInt(Round); // float -> int _score = resultData.kAddScore; // iTween.ValueTo 호출 시 (int)iCurrScore 이 값을 Hash에서 float으로 저장할때 손실발생. iTween.ValueTo(gameObject, iTween.Hash("from", 0, "to", (int)_score, "onUpdate", "CurrScoreCounter", "delay", 1, "time", 1)); }