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

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

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