示例#1
0
        public override void Initialize()
        {
            int bufferWidth = Definitions.IsWideScreen ? Wide_Buffer_Width : Standard_Buffer_Width;

            base.Initialize();

            _powerUpButton.Initialize();
            _powerUpButton.Center = new Vector2(bufferWidth - _powerUpButton.Radius, (_speedometer.Origin.X * 2) + _powerUpButton.Radius);

            _powerUpDisplayTimer.Initialize();
            _powerUpDisplayTimer.DisplayTopRight = new Vector2(bufferWidth, 0.0f);

            _countdownPopup.DisplayPosition      = new Vector2(bufferWidth / 2.0f, Buffer_Height * 0.25f);
            _raceEventPopup.DisplayPosition      = new Vector2(bufferWidth / 2.0f, Buffer_Height * 0.25f);
            _positionStatusPopup.DisplayPosition = new Vector2(bufferWidth / 2.0f, Buffer_Height - Position_Status_Popup_Bottom_Margin);
        }
示例#2
0
        protected override void CompletePostStartupLoadInitialization()
        {
            base.CompletePostStartupLoadInitialization();

            _quitRaceButton.Initialize();
            _quitRaceButton.DisplayEdgePositions = new Vector2(GameBase.SafeDisplayArea.X + GameBase.SafeDisplayArea.Width, 0.0f);
            _inputProcessor.AddButtonArea(QuitRaceButton.In_Game_Button_Name, _quitRaceButton.Center, _quitRaceButton.Radius, true);

            _powerUpButton.Initialize();
            _powerUpButton.Center = new Vector2(
                GameBase.SafeDisplayArea.X + GameBase.SafeDisplayArea.Width - _powerUpButton.Radius,
                GameBase.SafeDisplayArea.Y + GameBase.SafeDisplayArea.Height - _powerUpButton.Radius);

            _powerUpDisplayTimer.Initialize();

            _inputProcessor.AddButtonArea(PowerUpButton.In_Game_Button_Name, _powerUpButton.Center, _powerUpButton.Radius, false);
        }