public WorldmapLevel(WorldmapSector Sector, List Data)
        : base(Sector)
    {
        string SpriteName = "worldmap/common/leveldot.sprite";
        Properties Props = new Properties(Data);
        Props.Get("name", ref LevelFile);
        FieldPos LevelPos = new FieldPos();
        Props.Get("x", ref LevelPos.X);
        Props.Get("y", ref LevelPos.Y);
        Props.Get("sprite", ref SpriteName);
        Props.PrintUnusedWarnings();

        Sprite = SpriteManager.Create(SpriteName);
        Sprite.Pos = new Vector(LevelPos.X*32 + 16, LevelPos.Y*32 + 16);
    }
    public void Run()
    {
        WorldmapSector Sector = new WorldmapSector("worldmap.stwm");

        bool running = true;
        float frames = 0;
        uint frameticks = SDL.GetTicks();
        while(running) {
            Sdl.Event Event;
            while(SDL.PollEvent(out Event) > 0) {
                switch(Event.type) {
                    case SDL.QUIT:
                        running = false;
                        break;
                    case SDL.KEYDOWN:
                    case SDL.KEYUP:
                        Controller.HandleEvent(Event);
                        if(Controller.WasPressed(Control.MENU))
                            running = false;
                        break;
                }
            }

            Sector.Draw();
            SDL.GL_SwapBuffers();

            //SDL.Delay(10);
            Timer.Update(.01f);
            Sector.Update(.01f);

            frames++;
            uint ticks = SDL.GetTicks();
            if(ticks - frameticks > 1000) {
                Console.WriteLine("FPS: " + frames);
                frames = 0;
                frameticks = ticks;
            }
        }
    }
 public WorldmapObject(WorldmapSector Sector)
 {
     this.Sector = Sector;
 }
 public WorldmapTux(WorldmapSector Sector)
 {
     this.Sector = Sector;
     Controller = Application.Controller;
     Sprite = SpriteManager.Create("worldmap/common/tux.sprite");
 }