示例#1
0
 protected override void LoadContent()
 {
     // Load any game content
     // ================
     TextureHandler.LoadContent();
     AudioHandler.LoadContent();
 }
示例#2
0
        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);
        }
示例#3
0
        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);
            }
        }
示例#4
0
        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");
        }
示例#5
0
        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;
        }
示例#6
0
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     textureHandler.LoadContent(this);
 }