Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #4
0
 protected override void RegisterGameObject(IGameObject toRegister)
 {
     if (toRegister is IMobile)
     {
         _motionController.AddMobileObject((IMobile)toRegister);
     }
     base.RegisterGameObject(toRegister);
 }
Пример #5
0
        public TestScene()
            : base("Test-Scene", Definitions.Back_Buffer_Width, Definitions.Back_Buffer_Height)
        {
            _pauseDialog = new PauseDialog();
            RegisterGameObject(_pauseDialog);

            _motionController = new MotionController();
            _motionController.AddMobileObject(_pauseDialog);
        }
Пример #6
0
        public override void Initialize()
        {
            base.Initialize();

            if (Dialog != null)
            {
                Dialog.InputSources = _inputProcessors;
                _motionController.AddMobileObject(Dialog);
                RegisterGameObject(Dialog);
            }

            RegisterGameObject(Overlay);
        }
Пример #7
0
        public override void Initialize()
        {
            base.Initialize();

            _backDialog = new BackDialog();
            _backDialog.InputSources      = _inputProcessors;
            _backDialog.SelectionCallback = HandleBackDialogDismiss;

            _motionController.AddMobileObject(_backDialog);

            RegisterGameObject(_backDialog);

            CreateContent(_contentFileName);
        }
Пример #8
0
 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);
 }