public override void Initialize(GameContext context) { base.Initialize(context); audioHandler = ServiceLocator.Get<IAudioHandler>(); soundTimer = new GameTimer(TimeSpan.FromMilliseconds(500)); }
public NoiseDetectorViewModel(INoiseDetectorOptions options, IAudioHandler audio, IEventAggregator eventAggregator) { _noiseDetectorOptions = options; _audio = audio; _audio.AudioEventAvailable += OnAudioEventAvailable; _eventAggregator = eventAggregator; _eventAggregator.GetEvent <NoiseDetectorChangeEvent>().Subscribe(OnStopRequested); }
public void OnDestroy() { _handler?.Dispose(); _handler = null; if (_instance == this) { _instance = null; } }
public SNESSystem(ICPU cpu, IRenderer renderer, IROM rom, IPPU ppu, IAPU apu, IAudioHandler audioHandler) { CPU = cpu; Renderer = renderer; AudioHandler = audioHandler; ROM = rom; rom?.SetSystem(this); PPU = ppu; PPU?.SetSystem(this); APU = apu; CPU?.SetSystem(this); }
public override void Initialize(GameContext context) { base.Initialize(context); gui = new GuiManager(Context.Input, Context.Graphics.Device, Context.Graphics.SpriteBatch); InitializeInput(); audioHandler = ServiceLocator.Get<IAudioHandler>(); context.Input.Mouse.ShowCursor = true; context.Input.Mouse.AutoCenter = false; }
public GameplayGameState(IGameCustomizationHandler Handler, FieldInitializer pFieldInitializer, IAudioHandler pAudio, MenuState MainMenu) { Sounds = pAudio; GameHandler = Handler; MainMenuState = MainMenu; PlayField = new TetrisField(Handler.DefaultTheme, Handler); //PlayField.Settings = Settings; PlayField.OnThemeChangeEvent += PlayField_OnThemeChangeEvent; if (pFieldInitializer != null) { pFieldInitializer.Initialize(PlayField); } PlayField.BlockGroupSet += PlayField_BlockGroupSet; PlayField.SetStandardHotLines(); }
void InitializeHandler() { switch (source) { case AudioInputSource.CSCore: _handler = new CSCoreHandler(); break; case AudioInputSource.Unity: print("Lmao not yet."); //FIXME: make this shit work lol break; } //setup the audio handler _handler.Initialize(size); print("Audio Handler Initialized."); print("Using type: " + source.ToString() + " with FFT size of: " + (int)size); }
protected virtual void Awake() { _diedHandler = GetComponent <DiedHandler>(); _enemyAnimatorHandler = GetComponent <AttackedAnimatorHandler>(); _audioPlayer = GetComponent <IAudioHandler>(); }
static NetworkHandler() { socketService = DependencyService.Get <ISockets>(); audioHandler = DependencyService.Get <IAudioHandler>(); //new Audio.AudioHandler(); }
public void UnSubscribe(IAudioHandler item) { handlers.Remove(item); }
public void Subscribe(IAudioHandler item) { handlers.Add(item); }