IGameController SetupGameController(string fullPath) { var gameController = _gameControllerMake.New; gameController.LiveTrackerSettings = _liveTrackerSettings; gameController.ShuttingDown += () => GameControllers.Remove(fullPath); return(gameController); }
// Update is called once per frame void MakeSingleton() { if (instance != null) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
public void InitGameControllerList(object param) { GameControllers.Clear(); foreach (var device in _deviceService.GetDevices()) { GameControllers.Add(device); } SelectedDevice = GameControllers.Any(g => g.DeviceGuid == Configuration.DeviceGuid) ? GameControllers.FirstOrDefault(g => g.DeviceGuid == Configuration.DeviceGuid) : GameControllers.FirstOrDefault(); IsControllerButtonEnabled = GameControllers.Any(); StartLightService(); }
void NewHandFound(string fullPath, IConvertedPokerHand convertedPokerHand) { if (!GameControllers.ContainsKey(fullPath)) { if (!_liveTrackerSettings.AutoTrack) { return; } StartTracking(fullPath); } GameControllers[fullPath].NewHand(convertedPokerHand); }
public IGamesTracker StartTracking(string fullPath) { if (GameControllers.ContainsKey(fullPath)) { PublishUserWarningMessage(fullPath); return(this); } IGameController gameController = SetupGameController(fullPath); GameControllers.Add(fullPath, gameController); _newHandsTracker.TrackFolder(new FileInfo(fullPath).DirectoryName); _newHandsTracker.ProcessHandHistoriesInFile(fullPath); return(this); }
void Start() { gameController = FindObjectOfType <GameControllers>(); }
public void SetSelectedGameController(string selectedGameController) { this.selectedGameController = (GameControllers)System.Enum.Parse(typeof(GameControllers), selectedGameController); GameObject.Find("Game Controller Text").GetComponent <TextMeshProUGUI>().text = selectedGameController; }
private void UpdateControls(Time gameTime) { controllers.ForEach(c => c.Update()); GameControllers.ForEach(g => g.UpdateVibrations(gameTime)); }
private void Awake() //paso 0 { controller = GameObject.Find("GameController"); gmController = controller.GetComponent <GameControllers>(); //Sacando scripts }