protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); this.IsMouseVisible = true; // graphics.ToggleFullScreen(); Tools.Quick.content = Content; Tools.Quick.device = graphics.GraphicsDevice; Tools.Quick.graphics = graphics; Tools.Quick.init(); Tools.Quick.spriteBatch = spriteBatch; Map map = new Map(); map.GenMap(); //MapGen.MapConverter.Init(); //MapGen.MapVoronoi v = new MapGen.MapVoronoi(245); //v.Generate(); //v.Convert(); effect = new BasicEffect(graphics.GraphicsDevice); actualGround = LoadMap.loadground(map); texture = Tools.Quick.groundTexture[BiomeType.SubtropicalDesert]; testgivre = Content.Load<Texture2D>("givre"); //water.SetGround(actualGround); trees.SetGround(actualGround); trees.CreateTrees(); //element a supprimer cause de test myModel = Content.Load<Model>("Models\\sapin"); // myModel = Content.Load<Model>("Models\\untitled"); display.init(); camera.modiposition(actualGround.tiles[1].v2, true); phgest = new PhysicsGest(actualGround, new List<Object>()); camera.modiposition(actualGround.tiles[0].v1, true); // TODO: use this.Content to load your game content here //ps = new ParticleSimple(Content, this, Components); //psinit(); //psLoadContent(Content); arial = Content.Load<SpriteFont>("Arial"); // menu = new Menu(arial, TypeMenu.Principal); Tools.Quick.player = new Personnage("Test", true, 0, new Inventory(), myModel); //d = new Dungeon(); inf = new InventoryInterface(Content.Load<Texture2D>("InterfaceComponent\\Cadre"), Content.Load<Texture2D>("InterfaceComponent\\cadre bois"), Content.Load<Texture2D>("Test\\Mannequin"), Content.Load<Texture2D>("InterfaceComponent\\fond bois"), this); //d.setVisible(false); //Components.Add(d); base.LoadContent(); }
public void save() { Map map = new Map(); map.GenMap(); map.SaveImage("map"); }