Ejemplo n.º 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()
        {
            List<string> topten = this.SetUpText();

            this.textComponent = new MultilineText(
                this.Game
                , font
                , topten
                , new Vector2(
                    20f
                    , 100f
                )
                , false
            );

            this.Add(this.textComponent);

            base.Initialize();
        }
Ejemplo n.º 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()
        {
            base.Initialize();

            this.isSubmitted = false;
            this.name = DEFAULTUSER;
            this.message = "Press <<Enter>> or Button A to submit your score\nPress <<Escape>> or Big Button/Button Back to cancel.";
            this.onePixTexture = Utility.MakeOnePixTexture(this.GraphicsDevice);

            this.textComponent = new MultilineText(
                this.Game
                , this.font
                , this.CreateText()
                , new Vector2(
                    this.GraphicsDevice.Viewport.Bounds.Center.X
                    , this.GraphicsDevice.Viewport.Bounds.Center.Y
                )
                , true
            );
            this.textComponent.Initialize();
        }