Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        // 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);
            }
        }
Beispiel #3
0
 public override string ToString()
 {
     return(DayTextConverter.ConvertString(this.elapsedTime));
 }
Beispiel #4
0
        private void OverDay()
        {
            var span = DayTextConverter.ConvertSpan(GameManager.Instance.TimeManager.ElapsedTime);

            this.prevDay = span.Days;
        }
Beispiel #5
0
        private bool IsOverDay()
        {
            var span = DayTextConverter.ConvertSpan(GameManager.Instance.TimeManager.ElapsedTime);

            return(span.Days > this.prevDay);
        }