public void StartGame(GameHandlingConstants option = GameHandlingConstants.Handle_GameThread) { String sDataFolder = TetrisGame.AppDataFolder; String sSettingsFile = Path.Combine(sDataFolder, "Settings.xml"); GameSettings = new SettingsManager(sSettingsFile, _Owner); AudioThemeMan = new AudioThemeManager(AudioTheme.GetDefault(GameSettings.std.SoundScheme)); AudioThemeMan.ResetTheme(); if (GameLoopsRunning) { return; } GameLoopsRunning = true; var standardstate = new GameplayGameState(new StandardTetrisHandler(), null, TetrisGame.Soundman, null); //_Owner.GameStartTime = DateTime.MinValue; Game = new TetrisGame(_Owner, standardstate); //standardstate.Chooser = new MeanChooser(standardstate,Tetromino.StandardTetrominoFunctions); if (GameThread != null) { GameThread.Abort(); GameThread = null; } if (option == GameHandlingConstants.Handle_GameThread) { GameThread = new Thread(GameProc); GameThread.Start(); } if (InputThread != null) { InputThread.Abort(); } InputThread = new Thread(GamepadInputThread); InputThread.Start(); }
byte[] IAudioProvider.GetAudioGesture(AudioTheme theme, AudioGesture gesture) { byte[] bytes = _audioThemeGestures[theme][gesture]; return(bytes); }
public AudioController theme(AudioTheme.Theme theme) { droneConnection.sendCommand(AudioTheme.audioTheme(theme)); return(this); }