MonoGame - моноигровой инструмент, не встроенный в визуальную студию - PullRequest
0 голосов
/ 19 ноября 2018

Я создаю новый проект в Visual Studio 2017 на платформе Windows, и когда я дважды щелкаю по нему.

в содержимом mgcb, например, загружаю файл png и нажимаю build, и ничего не происходит, я не получаю ошибкуили увидеть что-то двигаться.почему это происходит?

Я пытаюсь загрузить 4 файла: перекрестие, галерея. Шрифт Sky Target

Визуальный код студии:

  namespace shooter_gallery
  {
   /// <summary>
   /// This is the main type for your game.
   /// </summary>
  public class Game1 : Game
    {
    GraphicsDeviceManager graphics;
    SpriteBatch spriteBatch;

    public Game1()
    {
        graphics = new GraphicsDeviceManager(this);
        Content.RootDirectory = "Content";
    }

    protected override void Initialize()
    {
        // TODO: Add your initialization logic here

        base.Initialize();
    }

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

        // TODO: use this.Content to load your game content here
    }

    protected override void UnloadContent()
    {
        // TODO: Unload any non ContentManager content here
    }

    protected override void Update(GameTime gameTime)
    {
        if (GamePad.GetState(PlayerIndex.One).Buttons.Back ==  ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            Exit();

        // TODO: Add your update logic here

        base.Update(gameTime);
    }

    protected override void Draw(GameTime gameTime)
    {
        GraphicsDevice.Clear(Color.CornflowerBlue);

        // TODO: Add your drawing code here

        base.Draw(gameTime);
    }
}
}

спасибо

...