public override void Activate() { base.Activate(); _startSequenceTimer.Reset(); ControllerPool.SetControllersToGameplayMode(); Communication.SubSceneCommunicator playerOneCommunicator = new Communication.SubSceneCommunicator(); Communication.SubSceneCommunicator playerTwoCommunicator = new Communication.SubSceneCommunicator(); playerOneCommunicator.OtherPlayerDataSource = playerTwoCommunicator; playerTwoCommunicator.OtherPlayerDataSource = playerOneCommunicator; _playerOneGameplayContainer.InputProcessor = ControllerPool.Controllers.PlayerOne; _playerOneGameplayContainer.Communicator = playerOneCommunicator; _playerOneGameplayContainer.PlayerSkinSlotIndex = NextSceneParameters.Get <int>(Player_One_Avatar_Skin_Parameter); _playerOneGameplayContainer.BufferArea = CreateDisplayArea(0); _playerOneGameplayContainer.Activate(); _playerTwoGameplayContainer.InputProcessor = ControllerPool.Controllers.PlayerTwo; _playerTwoGameplayContainer.Communicator = playerTwoCommunicator; _playerTwoGameplayContainer.PlayerSkinSlotIndex = NextSceneParameters.Get <int>(Player_Two_Avatar_Skin_Parameter); _playerTwoGameplayContainer.BufferArea = CreateDisplayArea(1); _playerTwoGameplayContainer.Activate(); _dialogContainer.BufferArea = ScaledBufferFrame; _dialogContainer.Activate(); }
protected override void CompleteDeactivation() { if (_nextSceneType != typeof(SurvivalGameplayScene)) { MusicManager.StopMusic(); ControllerPool.SetControllersToMenuMode(); } base.CompleteDeactivation(); }
protected override void CompleteDeactivation() { MusicManager.StopMusic(); base.CompleteDeactivation(); _startSequenceTimer.Reset(); ControllerPool.SetControllersToMenuMode(); }
public Mother(int rawStartIndex, string rawValue, Basics.ControlResult.Message messageResult, string updateBlockControlID) : base(rawStartIndex, rawValue, ControllerTypes.Mother, null) { this._Pool = new ControllerPool(); this.Scheduler = new ControllerSchedule(ref this._Pool); this.MessageResult = messageResult; this.ProcessingUpdateBlockControlID = updateBlockControlID; base.Mother = this; }
public override void Activate() { _gameplayContainer.BufferArea = CreateDisplayArea(); _gameplayContainer.CameraOverspillMargin = Vector2.Zero; _gameplayContainer.SafeAreaOuterLimits = new Rectangle(0, 0, Definitions.Back_Buffer_Width, Definitions.Back_Buffer_Height); ControllerPool.SetControllersToGameplayMode(); base.Activate(); _gameplayContainer.Activate(); }
public Game1() : base(1440, 900, true) //: base(1200, 675, false) //: base(1280, 768, false) //: base(1600, 900, false) //: base(GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width, GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height, true) { Guide.SimulateTrialMode = false; ControllerPool.CreateForGame(this); EnsureAllContentIsVisible = true; }
public override void Activate() { ControllerPool.SetControllersToMenuMode(); if (!NextSceneParameters.Get <bool>("music-already-running")) { MusicManager.PlayLoopedMusic("title"); } _musicToStartOnDeactivation = ""; base.Activate(); }
private void HandlePlayerTwoStartDialogAction(string buttonCaption) { switch (buttonCaption) { case "Back": _playerOneAvatarCarousel.Cancel(); ReturnToTitleScene(); break; case "Start": ControllerPool.SetPlayerTwoController(_playerTwoStartDialog.ActuatingController); _playerTwoAvatarCarousel.Activate(); break; } }
public override void Activate() { ControllerPool.SetControllersToMenuMode(); if (Data.Profile.PlayingRaceMode) { _message = Translator.Translation("Please make sure both controllers are plugged in"); } else { _message = Translator.Translation("Please make sure your controller is plugged in"); } base.Activate(); }
private void HandleStartDialogActionSelection(string selectedOption) { switch (selectedOption) { case "Adventure": Data.Profile.PlayingRaceMode = false; ControllerPool.SetPlayerOneController(_dialogs["start"].ActuatingController); ActivateDialog("survival-levels"); break; case "Race": Data.Profile.PlayingRaceMode = true; ControllerPool.SetPlayerOneController(_dialogs["start"].ActuatingController); ControllerPool.SetPlayerTwoController(null); NextSceneType = typeof(Gameplay.Race.RaceStartScene); _titlePopup.Dismiss(); break; case "Back": ActivateDialog("main"); break; } }
// Use this for initialization void Awake() { if (instance != null) Debug.LogWarning("ControllerPool: There is more than one instance of the Controller Pool in the scene."); else instance = this; pool = new List<Controller>(); controllers = Input.GetJoystickNames(); joined = string.Join(" ", controllers); for (int i = 0; i < controllers.Length && pool.Count < 4; i++) { if (controllers[i] != "") { AddController(controllers[i]); } } if (pool.Count == 0) { AddController("null"); pool[0].Disconnected(); } }
protected override void Dismiss() { ControllerPool.SetControllersToGameplayMode(); base.Dismiss(); }
public override void Activate() { ControllerPool.SetControllersToMenuMode(); base.Activate(); }
void Destroy() { if (instance == this) instance = null; }