Asteroids.Classes.MainMenu.Load C# (CSharp) 메소드

Load() 공개 메소드

public Load ( GraphicsDevice graphicsDevice ) : void
graphicsDevice GraphicsDevice
리턴 void
        public void Load(GraphicsDevice graphicsDevice)
        {
            spriteBatch = new SpriteBatch(graphicsDevice);

            //FontType
            txSelectArrow = Content.Load<Texture2D>("SelectArrow");
            fontType = Content.Load<SpriteFont>("Courier New");
            fontTypeTitle = Content.Load<SpriteFont>("Courier New");

            fontHighscores = Content.Load<SpriteFont>("Courier New");
            velocityHighscores = new Vector2(2f, 2f);
            highscores = new string[10];
            highscoreCounter = new int[10];
            for (int i = 0; i < 10; i++)
            {
                highscores[i] = "aaa";
                highscoreCounter[i] = 0;
            }
        }

Same methods

MainMenu::Load ( GraphicsDevice graphicsDevice, Highscores scores ) : void

Usage Example

예제 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            p.Load(Content);
            p.SetPlayerPos(spriteBatch);
            hud.Load(Content);
            mainMenu = new MainMenu(Content, graphics, ch);
            intro.Load(Content, graphics);
            oMenu.Load();
            mainMenu.Load(Content, graphicsDevice);
            background = new Background(GraphicsDevice, Content);
            loadingScreen = new LoadingScreen(Content, graphics.GraphicsDevice);
            alien = new Alien(Content.Load<Texture2D>("AlienShip"), new Vector2(50, 100), Vector2.Zero, 0f, 2f, Content.Load<Texture2D>("AlienBullet"));

            foreach (Weapon wep in p.weapList)
            {
                wep.Load(Content, p.GetDirection());
            }
        }