public void SetData(InGameProgress inGameData) { GameAnswers.SetText(inGameData.MaxQuestion, inGameData.CurQuestion); GameHearts.SetText(inGameData.MaxHearts, inGameData.CurHearts); GameReward.SetText(inGameData.Scores); }
private void StartAnnounce() { dispDispSec = wmInfo.popGuardSec - 5; if (AnnounceStart()) { timeLabel.text = InGameProgress.GetTimeToStringMMSS(wmInfo.popGuardSec); lastInteger = wmInfo.popGuardSec; countSec = (float)wmInfo.popGuardSec; state = eState.Announce; } }
private void ShowArenaElapsedTime(bool forward) { if (MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <InGameManager> .IsValid() && !(MonoBehaviourSingleton <InGameProgress> .I.GetArenaElapsedTime() <= 0f)) { ResetTween((Enum)UI.OBJ_ELAPSED_TIME, 0); if (MonoBehaviourSingleton <InGameProgress> .IsValid()) { MonoBehaviourSingleton <InGameProgress> .I.PlayTimeBonusSE(); } SetLabelText((Enum)UI.LBL_ELAPSED_TIME, InGameProgress.GetTimeWithMilliSecToString(MonoBehaviourSingleton <InGameProgress> .I.GetArenaElapsedTime())); PlayTween((Enum)UI.OBJ_ELAPSED_TIME, forward, (EventDelegate.Callback)null, false, 0); } }
private void Start() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) if (!QuestManager.IsValidInGameWaveMatch()) { this.get_gameObject().SetActive(false); } else { this.get_gameObject().SetActive(true); m_inGameProgress = MonoBehaviourSingleton <InGameProgress> .I; SetWaveNow(1, false); } }
private void UpdateAnnounce() { countSec -= Time.get_deltaTime(); int num = Mathf.FloorToInt(countSec); if (lastInteger != num) { lastInteger = num; timeLabel.text = InGameProgress.GetTimeToStringMMSS(num); } if (lastInteger <= 5) { StartCountDown(); } }
private void Start() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (!IsArena()) { this.get_gameObject().SetActive(false); } else { this.get_gameObject().SetActive(true); m_inGameMgr = MonoBehaviourSingleton <InGameManager> .I; m_inGameProgress = MonoBehaviourSingleton <InGameProgress> .I; waveMax.text = $"/{m_inGameMgr.GetArenaWaveMax()}"; m_wave = m_inGameMgr.GetCurrentArenaWaveNum(); SetWaveNow(m_wave); m_isTimeAttack = m_inGameMgr.IsArenaTimeAttack(); } }
private IEnumerator CountUpAnimation(float currentPoint, int targetPoint, UI targetUI) { float timer = 0f; while (cnt_timeBonus > 0 && timer < 2f) { timer += Time.get_deltaTime(); yield return((object)null); } yield return((object)new WaitForSeconds(0.2f)); while (currentPoint < (float)targetPoint) { yield return((object)0); float addingPoint = Mathf.Max(((float)targetPoint - currentPoint) * CountDownCube(Time.get_deltaTime() * 0.5f), 1f); currentPoint += addingPoint; currentPoint = Mathf.Min(currentPoint, (float)targetPoint); SetLabelText((Enum)targetUI, InGameProgress.GetTimeToString(Mathf.FloorToInt(currentPoint))); } }
private IEnumerator PlayCountUpClearTimeAnim(float targetTime, Action callBack) { float currentShowTime2 = 0f; while (currentShowTime2 < targetTime) { yield return((object)null); if (is_skip) { currentShowTime2 = targetTime; } int before = Mathf.FloorToInt(currentShowTime2); float addingTime = Mathf.Max((targetTime - currentShowTime2) * CountDownCube(Time.get_deltaTime() * 4f), 1f); currentShowTime2 += addingTime; currentShowTime2 = Mathf.Min(currentShowTime2, targetTime); if (before < Mathf.FloorToInt(currentShowTime2)) { SoundManager.PlayOneShotUISE(40000012); } SetLabelText((Enum)UI.LBL_CLEAR_TIME, InGameProgress.GetTimeWithMilliSecToString(currentShowTime2)); } callBack?.Invoke(); }
private void ShowArenaTimeBonus(bool forward) { //IL_0117: Unknown result type (might be due to invalid IL or missing references) if (HasArenaTimeBonus()) { ResetTween((Enum)UI.OBJ_REMAIN_TIME, 0); ResetTween((Enum)UI.OBJ_TIME_BONUS, 0); Transform itemRoot = GetCtrl(UI.OBJ_TIME_BONUS_ITEM); QuestArenaProgressData.ArenaTimeBonus[] bonus = MonoBehaviourSingleton <InGameProgress> .I.arenaTimeBonus.ToArray(); int plusSec = 0; List <Transform> timeBonusItemTransList = new List <Transform>(); SetGrid(UI.GRD_TIME_BONUS_ROOT, null, bonus.Length, true, delegate(int i, Transform t, bool isRecycle) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) Transform val = t.FindChild("bonus"); if (val == null) { val = ResourceUtility.Realizes(itemRoot.get_gameObject(), -1); val.set_parent(t); val.set_localPosition(Vector3.get_one()); val.set_localScale(itemRoot.get_localScale()); val.set_name("bonus"); } SetActive(val, true); UILabel component = FindCtrl(val, UI.LBL_TIME_BONUS).GetComponent <UILabel>(); component.alpha = 1f; component.text = string.Format(StringTable.Get(STRING_CATEGORY.RUSH_TIME_BONUS, 1u), bonus[i].bonusName, bonus[i].plusSec); component.fontStyle = 2; timeBonusItemTransList.Add(val); ResetTween(val, 0); plusSec += bonus[i].plusSec; }); if (MonoBehaviourSingleton <InGameProgress> .IsValid()) { MonoBehaviourSingleton <InGameProgress> .I.PlayTimeBonusSE(); } int num = Mathf.CeilToInt(MonoBehaviourSingleton <InGameProgress> .I.remaindTime); SetLabelText((Enum)UI.LBL_REMAIN_TIME, InGameProgress.GetTimeToString(num)); cnt_timeBonus = timeBonusItemTransList.Count; PlayTween((Enum)UI.OBJ_REMAIN_TIME, forward, (EventDelegate.Callback) delegate { PlayTween((Enum)UI.OBJ_TIME_BONUS, true, (EventDelegate.Callback) delegate { for (int j = 0; j < timeBonusItemTransList.Count; j++) { PlayTween(timeBonusItemTransList[j], forward, delegate { cnt_timeBonus--; }, true, 0); } }, false, 0); }, false, 0); int targetPoint = num + plusSec; this.StartCoroutine(CountUpAnimation((float)num, targetPoint, UI.LBL_REMAIN_TIME)); } }
public override void UpdateUI() { //IL_0306: Unknown result type (might be due to invalid IL or missing references) allPointEvents = new PointEventCurrentData(); allPointEvents.pointRankingData = new PointEventCurrentData.PointResultData(); isVictory = (MonoBehaviourSingleton <QuestManager> .I.arenaCompData != null); SetFullScreenButton((Enum)UI.BTN_SKIP_FULL_SCREEN); SetActive((Enum)UI.BTN_NEXT, false); SetActive((Enum)UI.BTN_RETRY, false); SetActive((Enum)UI.OBJ_TIME, false); SetActive((Enum)UI.OBJ_CLEAR_EFFECT_ROOT, false); SetActive((Enum)UI.OBJ_CLEAR_EFFECT, false); SetActive((Enum)UI.OBJ_RANK_UP_ROOT, false); SetActive((Enum)UI.OBJ_CONGRATULATIONS_ROOT, false); if (m_isTimeAttack) { SetActive((Enum)UI.OBJ_REMAIN_TIME, false); if (isVictory) { SetActive((Enum)UI.OBJ_TIME, true); } } string arg = string.Format(StringTable.Get(STRING_CATEGORY.ARENA, 1u), m_rank.ToString()); string arg2 = string.Format(StringTable.Get(STRING_CATEGORY.ARENA, 0u), m_group.ToString()); SetLabelText((Enum)UI.LBL_QUEST_NAME, $"{arg} {arg2}"); List <QuestCompleteRewardList> arenaRewards = MonoBehaviourSingleton <InGameManager> .I.arenaRewards; int num = 0; int num2 = 0; for (int j = 0; j < arenaRewards.Count; j++) { QuestCompleteRewardList questCompleteRewardList = arenaRewards[j]; QuestCompleteReward drop = questCompleteRewardList.drop; QuestCompleteReward breakReward = questCompleteRewardList.breakReward; QuestCompleteReward order = questCompleteRewardList.order; num += drop.exp + breakReward.exp + order.exp; num2 += drop.money + breakReward.money + order.money; } int my_user_id = MonoBehaviourSingleton <UserInfoManager> .I.userInfo.id; InGameRecorder.PlayerRecord playerRecord = MonoBehaviourSingleton <InGameRecorder> .I.players.Find((InGameRecorder.PlayerRecord data) => data.charaInfo.userId == my_user_id); if (playerRecord.beforeLevel >= Singleton <UserLevelTable> .I.GetMaxLevel()) { num = 0; } SetLabelText((Enum)UI.LBL_EXP, num.ToString("N0")); SetLabelText((Enum)UI.LBL_REWARD_GOLD, num2.ToString("N0")); SetLabelText((Enum)UI.LBL_TIME, MonoBehaviourSingleton <InGameProgress> .I.GetArenaRemainTimeToString()); SetLabelText((Enum)UI.LBL_CLEAR_TIME, InGameProgress.GetTimeWithMilliSecToString(0f)); SetActive((Enum)UI.SPR_BESTSCORE, false); if (isVictory) { SetLabelText((Enum)UI.LBL_BEFORE_TIME, InGameProgress.GetTimeWithMilliSecToString((float)(int)MonoBehaviourSingleton <QuestManager> .I.arenaCompData.previousClearMilliSec * 0.001f)); } bool flag = pointShopResultData.Count > 0; SetActive((Enum)UI.OBJ_POINT_SHOP_RESULT_ROOT, flag); if (flag) { SetGrid(UI.OBJ_POINT_SHOP_RESULT_ROOT, "QuestResultPointShop", pointShopResultData.Count, true, delegate(int i, Transform t, bool b) { ResetTween(t, 0); PointShopResultData pointShopResultData = base.pointShopResultData[i]; SetActive(t, UI.OBJ_NORMAL_POINT_SHOP_ROOT, !pointShopResultData.isEvent); if (!pointShopResultData.isEvent) { SetLabelText(t, UI.LBL_NORMAL_GET_POINT_SHOP, string.Format("+" + StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.getPoint)); SetLabelText(t, UI.LBL_NORMAL_TOTAL_POINT_SHOP, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.totalPoint)); UITexture component = FindCtrl(t, UI.TEX_NORMAL_POINT_SHOP_ICON).GetComponent <UITexture>(); ResourceLoad.LoadPointIconImageTexture(component, (uint)pointShopResultData.pointShopId); } SetActive(t, UI.OBJ_EVENT_POINT_SHOP_ROOT, pointShopResultData.isEvent); if (pointShopResultData.isEvent) { SetLabelText(t, UI.LBL_EVENT_GET_POINT_SHOP, string.Format("+" + StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.getPoint)); SetLabelText(t, UI.LBL_EVENT_TOTAL_POINT_SHOP, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopResultData.totalPoint)); UITexture component2 = FindCtrl(t, UI.TEX_EVENT_POINT_SHOP_ICON).GetComponent <UITexture>(); ResourceLoad.LoadPointIconImageTexture(component2, (uint)pointShopResultData.pointShopId); } }); } this.StartCoroutine(PlayAnimation()); }