public Clock(IAlarm alarm, IDisplay display) { _alarm = alarm; _buttonManager = new ButtonManager(); _display = display; _modeManager = new ModeManager(); _timeManager = new TimeManager(); _timer = new SixtySecondTimer(); _buttonManager.SetModeManager(_modeManager); _buttonManager.SetTimeManager(_timeManager); _timeManager.SetAlarm(_alarm); _timeManager.SetDisplay(_display); _timeManager.SetModeManager(_modeManager); _timer.SetTimeManager(_timeManager); }
public void CreatePlayable(IModeManager modeManager) { // Playable maps shouldn't support this action. if (IsPlayable) { Logger.LogWarning($"OriginalMap.CreatePlayable - This action is not supported for playable maps!"); return; } this.playableMaps.Clear(); foreach (var service in modeManager.PlayableServices()) { var playableMap = CreatePlayable(service); if (playableMap != null) { this.playableMaps[service.GameMode] = playableMap; } } }
private void Init(IModeManager modeManager, IDependencyContainer dependency) { // Create user statistics for missing game modes using mode manager. foreach (var mode in modeManager.PlayableServices()) { if (!statistics.ContainsKey(mode.GameMode)) { statistics[mode.GameMode] = new UserStatistics() { GameMode = mode.GameMode }; } } // Inject dependencies to all user statistics. foreach (var s in statistics.Values) { s.User = this; dependency.Inject(s); } }
public OsuMapsetParser(IModeManager modeManager) { this.modeManager = modeManager; }
public MapsetStore(IModeManager modeManager) { osuParser = new OsuMapsetParser(modeManager); }
public void SetModeManager(IModeManager modeManager) { _modeManager = modeManager; }