public EDM(Game game, SpriteBatch spriteBatch) : base(game, spriteBatch) { cursor = new Cursor(); fenetre = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); //taille de la fenetre MediaPlayer.IsMuted = true; text = new textbox(new Rectangle(game.Window.ClientBounds.Width / 3, game.Window.ClientBounds.Height / 3, 200, 100)); }
public EDM(Game game, SpriteBatch spriteBatch) : base(game, spriteBatch) { tile_list = new List<Button>(); map = new Map(); cursor = new Cursor(ressource.ARBRE); fenetre = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); //taille de la fenetre MediaPlayer.IsMuted = true; }
public void Update(GameTime gametime, string path,Cursor cursor) { lastKeyboardState = keyboardState; keyboardState = Keyboard.GetState(); //cursor.Update(gametime, new Vector2(800, 1200)); //ajoute dans la tiles vector2 les ID du cursor en fonction de sa position et ecrit l'id du tile dans le path if (keyboardState.IsKeyDown(Keys.Enter)) { tiles[(int)cursor.Position.X / 32, (int)cursor.Position.Y / 32] = cursor.iD; //ecrire(path); } }