public override void Activate() { _inputProcessor = ControllerPool.Controllers.PlayerOne; _pauseDialog.SetInputSourceToPlayerController(_inputProcessor); //_pauseDialog.SkipLevelButtonDisabled = false; _controllerDialog.SetInputSourcesToPlayerControllers(); _levelData = new Data.SurvivalLevelData(); StatusDisplay.CurrentLevelData = LevelData; StatusDisplay.FreezeDisplayedScore = false; SceneIsDeactivating = false; RaceAreaName = ""; base.Activate(); Paused = Profile.PauseOnSceneActivation; if (Paused) { ActivatePauseDialog(); } Profile.PauseOnSceneActivation = false; _player.InputProcessor = _inputProcessor; ((PlayerMotionEngine)_player.MotionEngine).DifficultySpeedBoosterUnit = Profile.CurrentAreaData.SpeedStep; _readyPopup.Activate(); }
protected override void CheckForAndHandleSelection(Input.InputProcessorBase inputSource) { base.CheckForAndHandleSelection(inputSource); if ((inputSource.SelectionTriggered) && (inputSource.SelectionLocation != Vector2.Zero)) { foreach (KeyValuePair <string, Rectangle> kvp in _keyAreas) { if (kvp.Value.Contains((int)inputSource.SelectionLocation.X, (int)(inputSource.SelectionLocation.Y - WorldPosition.Y))) { if (kvp.Key == "DEL") { DeleteLastCharacterFromEntry(); } else { AddCharacterToEntry(kvp.Key); } } } } if (Entry.Length < 1) { DisableButton("Start"); } else { EnableButton("Start"); } }
protected virtual void CheckForAndHandleSelection(Input.InputProcessorBase inputSource) { bool selectionMade = inputSource.SelectionTriggered; if ((selectionMade) && (inputSource.SelectionLocation != Vector2.Zero)) { selectionMade = CheckForSelectionAtTouchLocation(inputSource.SelectionLocation); } if (inputSource.BButtonPressed) { selectionMade = true; _activeButtonCaption = _cancelButtonCaption; } if (selectionMade) { ActuatingController = inputSource; Dismiss(); if (SelectionCallback != null) { SelectionCallback(_activeButtonCaption); } if (!string.IsNullOrEmpty(ActivateSelectionSoundEffectName)) { SoundEffectManager.PlayEffect(ActivateSelectionSoundEffectName); } } }
protected override void CheckForAndHandleSelection(Input.InputProcessorBase inputSource) { if (inputSource.SelectionTriggered) { if ((inputSource.SelectionLocation != Vector2.Zero) || (_activeButtonCaption == "Start!") || (_activeButtonCaption == "Back")) { base.CheckForAndHandleSelection(inputSource); } else { HandleStepSelection(_activeButtonCaption); } } }
protected override void CheckForAndHandleSelection(Input.InputProcessorBase inputSource) { base.CheckForAndHandleSelection(inputSource); try { foreach (KeyValuePair <string, OpponentSelector> kvp in _opponents) { if ((kvp.Value != null) && (kvp.Value.ContainsLocation(inputSource.SelectionLocation))) { HandleOpponentSelection(kvp.Value); break; } } } catch { } }
protected virtual void CheckForAndHandleSelection(Input.InputProcessorBase inputSource) { bool selectionMade = inputSource.SelectionTriggered; if ((selectionMade) && (inputSource.SelectionLocation != Vector2.Zero)) { selectionMade = CheckForSelectionAtTouchLocation(inputSource.SelectionLocation); } if (selectionMade) { if (SelectionCallback != null) { SelectionCallback(_activeButtonCaption); } Dismiss(); } }
protected override void CheckForAndHandleSelection(Input.InputProcessorBase inputSource) { if (!Rotating) { if (inputSource.SelectionTriggered) { if (inputSource.SelectionLocation != Vector2.Zero) { base.CheckForAndHandleSelection(inputSource); } else if (_nonSpinButtonCaptions.Contains(_activeButtonCaption)) { if ((!(inputSource is GamePadInputProcessor)) || (!((GamePadInputProcessor)inputSource).SelectionIsByStartButton) || (!_captionsForButtonsNotActivatedByGamepadStartButton.Contains(_activeButtonCaption))) { ActionButtonPressHandler(_activeButtonCaption); if (!string.IsNullOrEmpty(ActivateSelectionSoundEffectName)) { SoundEffectManager.PlayEffect(ActivateSelectionSoundEffectName); } } } else { HandleStepSelection(_activeButtonCaption); } } else if (inputSource.MoveLeft) { HandleStepSelection("previous"); } else if (inputSource.MoveRight) { HandleStepSelection("next"); } } }
protected override void CheckForAndHandleSelection(Input.InputProcessorBase inputSource) { if (inputSource.SelectionTriggered) { if (inputSource.SelectionLocation != Vector2.Zero) { base.CheckForAndHandleSelection(inputSource); } else { if ((_activeButtonCaption == "Back") || (_activeButtonCaption == "Reset Game")) { Dismiss(); } else { HandleToggle(_activeButtonCaption); } SoundEffectManager.PlayEffect(ActivateSelectionSoundEffectName); } } }