public void DepositScream(IReadOnlyList <ScreamSoundDefinition> screams) { bool success = false; for (int i = 0; i < screams.Count; ++i) { success |= _remainingRequests.Remove(screams[i]); } if (!success) { GameUI.Instance.DialogUI.ShowDialog("No compatible screams detected", 5, _speakerTransform, Vector3.zero); } else { GameUI.Instance.DialogUI.ShowDialog("Screams successfully ingested", 5, _speakerTransform, Vector3.zero); } RemainingScreamsChanged?.Invoke(); }
public void OnStartedDay(int dayIndex) { ScreamCalendarDay calendarDay = _calendarDays[dayIndex]; _currentDayRequests.Clear(); _remainingRequests.Clear(); for (int i = 0; i < calendarDay.MainScreamCount; ++i) { _currentDayRequests.Add(calendarDay.PossibleScreamRequests.Screams[0]); } for (int i = 0; i < calendarDay.CommonScreamCount; ++i) { int randomIndex = Random.Range(0, calendarDay.PossibleScreamRequests.Screams.Count); _currentDayRequests.Add(calendarDay.PossibleScreamRequests.Screams[randomIndex]); } _remainingRequests.AddRange(_currentDayRequests); RemainingScreamsChanged?.Invoke(); }