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(); } }
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; }
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>(); }
public void OnInit() { dayPhase = StaticStates.Get <DayPhaseState>(); timeState = StaticStates.Get <TimeState>(); }