예제 #1
0
        public void Update()
        {
            if (!GameRunner.Instance.GameStarted)
            {
                return;
            }

            if (timeState == null)
            {
                timeState = StaticStates.Get <TimeState>();
            }

            if (dayPhase == null)
            {
                dayPhase = StaticStates.Get <DayPhaseState>();
            }

            if (timeState == null || dayPhase == null)
            {
                return;
            }

            Day.text = string.Format(DayText, timeState.GameTime.GetDay());

            if (dayPhase.CurrentDayPhase == DayPhase.Open)
            {
                Time.text = string.Format(TimeText, timeState.GameTime.GetHour(), timeState.GameTime.GetMinute());
            }
            else
            {
                Time.text = dayPhase.CurrentDayPhase.ToString();
            }
        }
예제 #2
0
 public void OnEndInit(List <Entity> allPeople)
 {
     dayPhase                    = StaticStates.Get <DayPhaseState>();
     time                        = StaticStates.Get <TimeState>();
     people                      = allPeople;
     hallwayWalkers              = EntityQueries.GetNPCSWithName(allPeople, NPCName.Expendable);
     dayPhase.DayPhaseChangedTo += OnDayPhaseChanged;
 }
예제 #3
0
        public void OnInit()
        {
            EventSystem.StartDrinkMakingEvent += OnStartMakingDrink;
            EventSystem.OnClickedEvent        += OnClickInteraction;
            EventSystem.EndDrinkMakingEvent   += StopMakingDrink;

            playerState     = StaticStates.Get <PlayerState>();
            player          = playerState.Player;
            playerInventory = player.GetState <InventoryState>();

            dayPhase = StaticStates.Get <DayPhaseState>();
        }
예제 #4
0
 public void OnInit()
 {
     dayPhase  = StaticStates.Get <DayPhaseState>();
     timeState = StaticStates.Get <TimeState>();
 }