public IsometricTileEngine(int lvlWidth, int lvlHeight)
        {
            enviroment = new TileMatrix[3];
            enviroment[0] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);
            enviroment[1] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);
            enviroment[2] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);

            decoration = new TileMatrix[3];
            decoration[0] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);
            decoration[1] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);
            decoration[2] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);

            buildlayer = new TileMatrix[3];
            buildlayer[0] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);
            buildlayer[1] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);
            buildlayer[2] = new TileMatrix(TileHeight - HeightTileOffset, TileWidth, null);

            hMap = new HeightMap(lvlWidth, lvlHeight);
        }
Example #2
0
        /// <summary>
        /// Loads everything
        /// </summary>
        public void Load(ContentManager content)
        {
            textureCache.TryAdd("BaseTexture", content.Load<Texture2D>("Textures\\gras.png"));
            textureCache.TryAdd("BuildCursor", content.Load<Texture2D>("Textures\\RedBorder.png"));
            textureCache.TryAdd("Stone", content.Load<Texture2D>("Textures\\stein.png"));
            textureCache.TryAdd("WoodWall", content.Load<Texture2D>("Textures\\holzwand.png"));
            textureCache.TryAdd("WoodWallCorner", content.Load<Texture2D>("Textures\\holzwandecke.png"));
            textureCache.TryAdd("MenuBar", content.Load<Texture2D>("Textures\\Menüleiste.png"));
            textureCache.TryAdd("MenuBarEnding", content.Load<Texture2D>("Textures\\Menüleistenendung.png"));

            // Load Python Scripts here
            //plTest = new PythonLoader(File.ReadAllText(@"C:\Users\Sebastian\Documents\GitHubVisualStudio\InsertNameHere\InsertNameHere\InsertNameHere\Scripts\Test\TestScript.py"), "MathTest");

            Texture2D tex;
            textureCache.TryGetValue("BaseTexture", out tex);
            ground = new TileMatrix(height, width, tex);
            buildlayer = new TileMatrix(Color.Red, height, width, gr);
            mb = new BuildingMenuBar(textureCache);
            mb.SetPosition(200, 200);
            Cursor.Load();
        }