예제 #1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            ContentLibrary.LoadedTexture(Content, GraphicsDevice);
            ContentLibrary.LoadSprites(Content, GraphicsDevice);
            ContentLibrary.LoadFont(Content);
            ContentLibrary.LoadSounds(Content);
            ContentLibrary.loadXml(Content);

            CurrentScreen.Start();

            // TODO: use this.Content to load your game content here
        }
예제 #2
0
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }
            if (GamePad.GetState(PlayerIndex.One).Buttons.Start == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.F5))
            {
                CurrentScreen = new GamePlayScreen(this, Graphics);
                CurrentScreen.Start();
            }

            CurrentScreen.Update(gameTime);

            // TODO: Add your update logic here

            base.Update(gameTime);
        }