public RaceDialogContainerSubScene() : base(Definitions.Back_Buffer_Width, Definitions.Back_Buffer_Height) { _quitRaceDialog = new QuitRaceDialog(); RegisterGameObject(_quitRaceDialog); _controllerDialog = new ControllerUnpluggedDialog(); RegisterGameObject(_controllerDialog); _motionController = new MotionController(); _motionController.AddMobileObject(_quitRaceDialog); _motionController.AddMobileObject(_controllerDialog); }
protected override void RegisterGameObject(IGameObject toRegister) { if (toRegister is IMobile) { _motionController.AddMobileObject((IMobile)toRegister); } if (toRegister is IAnimated) { _animationController.AddAnimatedObject((IAnimated)toRegister); } if (toRegister is ICameraLinked) { _cameraController.AddCameraLinkedObject((ICameraLinked)toRegister); } if (toRegister is ICollidable) { _playerCollisionController.AddCollidableObject((ICollidable)toRegister); } if (toRegister is IPausable) { _pauseController.AddPausableObject((IPausable)toRegister); } base.RegisterGameObject(toRegister); }
protected override void RegisterGameObject(IGameObject toRegister) { if (toRegister is IMobile) { _motionController.AddMobileObject((IMobile)toRegister); } if (toRegister is IAnimated) { _animationController.AddAnimatedObject((IAnimated)toRegister); } if (toRegister is ICameraLinked) { _cameraController.AddCameraLinkedObject((ICameraLinked)toRegister); } if (toRegister is ICollidable) { _playerCollisionController.AddCollidableObject((ICollidable)toRegister); } if (toRegister is IPausable) { _pauseController.AddPausableObject((IPausable)toRegister); } if (toRegister is SmashBlock) { ((SmashBlock)toRegister).SmashCallback = HandleSmashBlockSmash; } if (toRegister is ICanHaveGlowEffect) { _objectWithGlowEffect.Add((ICanHaveGlowEffect)toRegister); } base.RegisterGameObject(toRegister); }
protected override void RegisterGameObject(IGameObject toRegister) { if (toRegister is IMobile) { _motionController.AddMobileObject((IMobile)toRegister); } base.RegisterGameObject(toRegister); }
public TestScene() : base("Test-Scene", Definitions.Back_Buffer_Width, Definitions.Back_Buffer_Height) { _pauseDialog = new PauseDialog(); RegisterGameObject(_pauseDialog); _motionController = new MotionController(); _motionController.AddMobileObject(_pauseDialog); }
public override void Initialize() { base.Initialize(); if (Dialog != null) { Dialog.InputSources = _inputProcessors; _motionController.AddMobileObject(Dialog); RegisterGameObject(Dialog); } RegisterGameObject(Overlay); }
public override void Initialize() { base.Initialize(); _backDialog = new BackDialog(); _backDialog.InputSources = _inputProcessors; _backDialog.SelectionCallback = HandleBackDialogDismiss; _motionController.AddMobileObject(_backDialog); RegisterGameObject(_backDialog); CreateContent(_contentFileName); }
protected override void RegisterGameObject(IGameObject toRegister) { if (toRegister is ICameraLinked) { _cameraController.AddCameraLinkedObject((ICameraLinked)toRegister); } if (toRegister is IMobile) { _motionController.AddMobileObject((IMobile)toRegister); } if (toRegister is IComponent) { Data.Container.Components.Add((IComponent)toRegister); } base.RegisterGameObject(toRegister); }