public void Initialize()
        {
            Global.camera.X = 0;
            Global.camera.Y = 0;
            //the first two indices are obviously x and y, although the third is NOT z!
            //the third stores any number of tiles when z can be queryed.
            //Note that this is not inefficient for the GraphicsCard since
            //the TileMap takes the three-dimensional and skips the null cells
            //when copying the vertices.
            TileMapParser mapLoader = new TileMapParser();
            TileMap demoMap = mapLoader.LoadMap("DemoMap");
            demoMap.player = new OWPlayer("Images/Characters/nickOW", new int[3]{1,1,0}, Tile.Direction.SOUTH);
            demoMap.Initialize();
            tileMaps.Add("DemoMap", demoMap);
            TileMap stairMap = mapLoader.LoadMap("StairMap");
            tileMaps.Add("StairMap", stairMap);
            tileMap = demoMap;

            battleMaps = new Dictionary<string, BattleMap>();
            Battler[] battlers = new Battler[1];
            battlers[0] = new Battler("Images/Characters/nickBattle", new Vector3(0, 0, 0));
            BattleMap testMap = new BattleMap("Ice_Path", battlers, 0);
            testMap.Initialize();
            battleMaps.Add("Ice_Path", testMap);
            battleMap = testMap;

            dialog = new Dialog();
            dialog.Initialize();
        }
 public void SetTileMap(string mapName, int[] destPos, Tile.Direction dir)
 {
     TileMap nextMap = tileMaps[mapName];
     nextMap.player = tileMap.player;
     nextMap.player.SetMapPos(destPos);
     nextMap.Initialize();
     nextMap.player.SetDir(dir);
     tileMap = nextMap;
 }