public void UpdateTimeNotification(UpdateEvent e, NotificationMessageNode notification, [JoinAll] ShutdownNode shutdown, [Combine, JoinAll] SingleNode <LocalizedTimerComponent> timer) { float time = shutdown.serverShutdown.StopDateForClient.UnityTime - Date.Now.UnityTime; if (time < 0f) { time = 0f; } string str = timer.component.GenerateTimerString(time); notification.notificationMessage.Message = string.Format(notification.serverShutdownText.Text, str); }
public void UpdateTimeNotification(UpdateEvent e, NotificationMessageNode notification, [JoinAll] SelfBattleNode battle, [JoinAll, Combine] SingleNode <LocalizedTimerComponent> timer) { float num = (float)(Date.Now - battle.battleStartTime.RoundStartTime); float time = battle.timeLimit.TimeLimitSec - num; if (time < 0f) { time = 0f; } string str = timer.component.GenerateTimerString(time); notification.notificationMessage.Message = string.Format(notification.battleShutdownText.Text, str); }