コード例 #1
0
        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            _colorStream.Position = _colorStreamPosition;
            _colorStream.Size     = Vector2.Zero;
            _colorStream.Initialize();

            _startingPosition = new Vector2(
                _colorStreamPosition.X,
                _colorStreamPosition.Y
                );

            foreach (GuiDrawable guiDrawable in _guiDrawableReplay)
            {
                ((GuiButton)guiDrawable).ClickEvent += GuiButtonWasClicked;
            }

            foreach (GuiDrawable guiDrawable in _guiDrawableSelect)
            {
                ((GuiButton)guiDrawable).ClickEvent += GuiButtonWasClicked;
            }

            _isInitialized = true;

            base.Initialize();
        }
コード例 #2
0
        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            _colorStream.Position = _colorStreamPosition;
            _colorStream.Size     = _colorStreamSize;
            _colorStream.Initialize();

            foreach (GuiDrawable guiDrawable in _guiDrawable)
            {
                if (guiDrawable.GetType() == typeof(GuiButton))
                {
                    ((GuiButton)guiDrawable).ClickEvent += GuiButtonWasClicked;
                }
            }

            _isInitialized = true;

            base.Initialize();
        }