private void CheckTimeDifference() { if (!readyToClaim) { TimeSpan difference = dailyRewards.GetTimeDifference(); // If the counter below 0 it means there is a new reward to claim if (difference.TotalSeconds <= 0) { readyToClaim = true; UpdateUI(); SnapToReward(); return; } string formattedTs = dailyRewards.GetFormattedTime(difference); textTimeDue.text = string.Format("Come back in {0} for your next reward", formattedTs); } }
private void CheckTimeDifference() { if (!readyToClaim) { TimeSpan difference = dailyRewards.GetTimeDifference(); // If the counter below 0 it means there is a new reward to claim if (difference.TotalSeconds <= 0) { readyToClaim = true; UpdateUI(); SnapToReward(); return; } string formattedTs = dailyRewards.GetFormattedTime(difference); //textTimeDue.text = string.Format("Come back in {0} for your next reward", formattedTs); textTimeDue.text = LocalizationManager.instance.StringForKey("DailyReward_TimerText_1") + "<color=#22EE11>" + formattedTs + "</color>" + LocalizationManager.instance.StringForKey("DailyReward_TimerText_2"); } }