protected override void LoadContent() { // Load any game content // ================ TextureHandler.LoadContent(); AudioHandler.LoadContent(); }
protected override void Initialize() { base.Initialize(); textureHandler.LoadContent(this); Color[] az = Enumerable.Range(0, 1).Select(i => Color.Red).ToArray(); mouseIntersectTexture = textureHandler.colorTexture; mouseIntersectTexture.SetData(az); collisionTexture = textureHandler.collisionMap; depthTexture = textureHandler.depthMap; tileTexture = textureHandler.tileMapTexture; entityTexture = textureHandler.entityMap; camera = new Camera(Editor.graphics.Viewport); form = (MainForm)FindForm(); tileMap = new int[tmWidth * tmHeight]; collisionMap = new int[tmWidth * tmHeight]; depthMap = new int[tmWidth * tmHeight]; entityMap = new int[tmWidth * tmHeight]; tileMapEditHandler = new UndoRedoHandler(tileMap); tileMapEditHandler.AddIteration(tileMap); }
public static void LoadContent(ContentManager content, GameWindow window) { TextureHandler.LoadContent(content); //Deserialize all earlier games gameHandlers = GameHandler.DeserializeOnStartup(); store.Load(graphicsDevice); //Menu load stuff menu = new Menu((int)States.Menu); menu.LoadContent(graphicsDevice, window, content); menu.AddItem(content.Load <Texture2D>("Menu/Play"), (int)States.GameStart, window, content.Load <Texture2D>("Menu/MenuIcons/PlayNew")); menu.AddItem(content.Load <Texture2D>("Menu/Store"), (int)States.Saves, window, content.Load <Texture2D>("Menu/MenuIcons/Saves")); menu.AddItem(content.Load <Texture2D>("Menu/Store"), (int)States.Store, window, content.Load <Texture2D>("Menu/MenuIcons/Collection")); menu.AddItem(content.Load <Texture2D>("Menu/Exit"), (int)States.Quit, window, content.Load <Texture2D>("Menu/MenuIcons/Exit")); //check progress on eg. dog unlock etc CheckProgress(); //Add previous games to the save manager displayGames.LoadContent(window, graphicsDevice); foreach (GameHandler gh in gameHandlers) { displayGames.AddGameItem(gh); } }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); textureHandler.LoadContent(this); fontHandler.LoadContent(this); tempCrate = Content.Load <Texture2D>("images/crate"); torchTexture = Content.Load <Texture2D>("images/torch"); }
protected override void Initialize() { base.Initialize(); textureHandler.LoadContent(this); tileMap = textureHandler.tileMapTexture; collisionMap = textureHandler.collisionMap; depthMap = textureHandler.depthMap; entityMap = textureHandler.entityMap; currentTexture = tileMap; maxScrollVal = (currentTexture.Width / 16 / screenWidth) * tileSize + tileSize - Size.Height; Color[] az = Enumerable.Range(0, 1).Select(i => Color.Red).ToArray(); mouseIntersectTexture = textureHandler.colorTexture; selectedTileTexture = textureHandler.colorTexture; mouseIntersectTexture.SetData(az); selectedTileTexture.SetData(az); form = FindForm(); mainWindow = form.Controls["MG_window"] as MG_Main; }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); textureHandler.LoadContent(this); }