Scarica in formato docx, pdf o txt
Scarica in formato docx, pdf o txt
Sei sulla pagina 1di 1

WinGameImages cambiamos game1 por game WinGameImages, click derecho/propiedades y cambiamos el "Reach to acces a limited API De Game.

cs copiamos las referencias a Image.cs


using using using using using using using Microsoft.Xna.Framework; Microsoft.Xna.Framework.Audio; Microsoft.Xna.Framework.Content; Microsoft.Xna.Framework.GamerServices; Microsoft.Xna.Framework.Graphics; Microsoft.Xna.Framework.Input; Microsoft.Xna.Framework.Media;

copiamos todo el contenido de image de XNAdel un proyecto al otro proyecto XNA2 agregamos
public Game() { mGraphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; Window.Title = "Dibujando varias imagenes"; mGraphics.PreferredBackBufferWidth = 400; mGraphics.PreferredBackBufferHeight = 300; mGraphics.ApplyChanges();

que es el tamanio de pantalla establecemos cargar la imagen


protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. mSpriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here mImage1 = new Image(); mImage1.Load("ball",new Vector2(0f,0f),new Vector2(64f,64f));//cargamos la imagen llamada ball en la posicion 0,0 y el tamanio 64X64 }

Potrebbero piacerti anche