public void UpdateByFrame() { if (!this.isInitialize) { var span = DayTextConverter.ConvertSpan(GameManager.Instance.TimeManager.ElapsedTime); this.prevDay = span.Days; this.isInitialize = true; } if (this.IsOverDay()) { GameManager.Instance.GameModeManager.EnqueueChangeMode(GameModeGenerator.GenerateDailyChangeMode()); this.OverDay(); } }
// Update is called once per frame void Update() { dayValue.text = GameManager.Instance.TimeManager.ToString(); progress.value = DayTextConverter.OneDayProgress(GameManager.Instance.TimeManager.ElapsedTime); if (GameManager.Instance.TimeManager.IsPause) { this.NormalBar.SetActive(false); this.StopBar.SetActive(true); } else { this.NormalBar.SetActive(true); this.StopBar.SetActive(false); } }
public override string ToString() { return(DayTextConverter.ConvertString(this.elapsedTime)); }
private void OverDay() { var span = DayTextConverter.ConvertSpan(GameManager.Instance.TimeManager.ElapsedTime); this.prevDay = span.Days; }
private bool IsOverDay() { var span = DayTextConverter.ConvertSpan(GameManager.Instance.TimeManager.ElapsedTime); return(span.Days > this.prevDay); }