public LotDebugScreen()
        {
            var lotInfo = XmlHouseData.Parse(GameFacade.GameFilePath("housedata/blueprints/restaurant01_00.xml"));

            World = new World(GameFacade.Game.GraphicsDevice);
            GameFacade.Scenes.Add(World);

            vm = new TSO.Simantics.VM(new VMContext(World));
            vm.Init();

            var activator = new VMWorldActivator(vm, World);
            var blueprint = activator.LoadFromXML(lotInfo);

            World.InitBlueprint(blueprint);
            vm.Context.Blueprint = blueprint;

            var sim = activator.CreateAvatar();
            //sim.Position = new Vector3(31.5f, 55.5f, 0.0f);
            sim.Position = new Vector3(26.5f, 41.5f, 0.0f);

            VMDebug = new UIButton()
            {
                Caption = "Simantics",
                Y = 45,
                Width = 100,
                X = GlobalSettings.Default.GraphicsWidth - 110
            };
            VMDebug.OnButtonClick += new ButtonClickDelegate(VMDebug_OnButtonClick);
            this.Add(VMDebug);

            LotController = new UILotControl(vm, World);
            this.AddAt(0, LotController);

            ucp = new UIUCP(this);
            ucp.Y = ScreenHeight - 210;
            ucp.SetInLot(true);
            ucp.SetMode(UIUCP.UCPMode.LotMode);
            ucp.SelectedAvatar = sim;
            ucp.SetPanel(1);

            //ucp.ZoomLevel = 1;
            //ucp.OnZoomChanged += new UCPZoomChangeEvent(ucp_OnZoomChanged);
            //ucp.OnRotateChanged += new UCPRotateChangeEvent(ucp_OnRotateChanged);
            this.Add(ucp);
        }
        public void InitTestLot()
        {
            var lotInfo = XmlHouseData.Parse(GameFacade.GameFilePath("housedata/blueprints/restaurant08_00.xml"));

            World = new World(GameFacade.Game.GraphicsDevice);
            GameFacade.Scenes.Add(World);

            vm = new TSO.Simantics.VM(new VMContext(World));
            vm.Init();

            var activator = new VMWorldActivator(vm, World);
            var blueprint = activator.LoadFromXML(lotInfo);

            World.InitBlueprint(blueprint);
            vm.Context.Blueprint = blueprint;

            var sim = activator.CreateAvatar();
            sim.Position = new Vector3(26.5f, 41.5f, 0.0f);

            var sim2 = activator.CreateAvatar();
            sim2.Position = new Vector3(27.5f, 41.5f, 0.0f);

            /*for (float x = 30.5f; x < 40.5; x+=1.0f)
            {
                for (float y = 42.5f; y < 52.5; y += 1.0f)
                {
                    var sim3 = activator.CreateAvatar();
                    sim3.Position = new Vector3(x, y, 0.0f);
                }
            }*/

            LotController = new UILotControl(vm, World);
            this.AddAt(0, LotController);

            vm.Context.Clock.Hours = 6;

            ucp.SelectedAvatar = sim;
            ucp.SetInLot(true);
            if (m_ZoomLevel > 3) World.Visible = false;
        }
        public void InitTestLot(string path)
        {
            var lotInfo = XmlHouseData.Parse(path);

            if (vm != null) CleanupLastWorld();

            World = new World(GameFacade.Game.GraphicsDevice);
            GameFacade.Scenes.Add(World);

            vm = new TSO.Simantics.VM(new VMContext(World));
            vm.Init();

            var activator = new VMWorldActivator(vm, World);
            var blueprint = activator.LoadFromXML(lotInfo);

            World.InitBlueprint(blueprint);
            vm.Context.Blueprint = blueprint;

            var sim = activator.CreateAvatar();
            sim.Position = LotTilePos.FromBigTile(56, 33, 1);

            var sim2 = activator.CreateAvatar();
            sim2.Position = LotTilePos.FromBigTile(56, 34, 1);

            var mailbox = vm.Entities.First(x => (x.Object.OBJ.GUID == 0xEF121974 || x.Object.OBJ.GUID == 0x1D95C9B0));

            VMFindLocationFor.FindLocationFor(sim, mailbox, vm.Context);
            VMFindLocationFor.FindLocationFor(sim2, mailbox, vm.Context);
            HITVM.Get().PlaySoundEvent("lot_enter");

            World.State.CenterTile = new Vector2(sim.VisualPosition.X, sim.VisualPosition.Y);

            LotController = new UILotControl(vm, World);
            this.AddAt(0, LotController);

            vm.Context.Clock.Hours = 10;

            ucp.SelectedAvatar = sim;
            ucp.SetInLot(true);
            if (m_ZoomLevel > 3) World.Visible = false;

            ZoomLevel = 1;
        }