Exemplo n.º 1
0
 public Order(Client c, Book[] bs, DateTime dt)
     : base()
 {
     Date = dt;
     Client = c;
     Books = bs;
 }
Exemplo n.º 2
0
 public Order(Client c, Book[] bs)
     : this(c,bs,DateTime.Now)
 {
 }
 void New(Client.Game.Map.MapSettings settings)
 {
     Text = "Leditor | Untitled";
     if (CurrentMap != null)
         CurrentMap.Ground.SplatMap1.Resource9.Data.Dispose();
     if (CurrentMap != null)
         CurrentMap.Ground.SplatMap2.Resource9.Data.Dispose();
     CurrentMap = Client.Game.Map.Map.New(settings, worldView.Device9);
     InitMap();
 }
 void SetupAngle(Client.Game.Map.CameraAngle a)
 {
     a.Position = MainWindow.Instance.worldView.Scene.Camera.Position;
     a.Lookat = ((Graphics.LookatCamera)MainWindow.Instance.worldView.Scene.Camera).Lookat;
     a.Up = ((Graphics.LookatCamera)MainWindow.Instance.worldView.Scene.Camera).Up;
 }
 public void LoadRegions(Client.Game.Map.Map map)
 {
     regionsListBox.Items.Clear();
     foreach (var v in map.Regions)
         regionsListBox.Items.Add(v);
 }
Exemplo n.º 6
0
        public void InitMap(Client.Game.Map.Map map)
        {
            Scene.Root.ClearChildren();
            if (sceneQuadtreeAutoSyncer != null)
                sceneQuadtreeAutoSyncer.Disconnect();

            Renderer.Settings.WaterLevel = map.Settings.WaterHeight;

            sceneQuadtree = new Common.Quadtree<Entity>(10);
            sceneQuadtreeAutoSyncer = new SceneBVHAutoSyncer(Scene, sceneQuadtree);

            PlacementBoundings = new Common.Quadtree<Entity>(10);
            placementBoundingsSyncer = new SceneBVHAutoSyncer(Scene, PlacementBoundings);
            placementBoundingsSyncer.GetLocalBounding =
                (e) => e is Client.Game.Map.GameEntity ? ((Client.Game.Map.GameEntity)e).EditorPlacementLocalBounding : null;
            placementBoundingsSyncer.GetWorldBounding =
                (e) => e is Client.Game.Map.GameEntity ? ((Client.Game.Map.GameEntity)e).EditorPlacementWorldBounding : null;
            placementBoundingsSyncer.RegisterLocalBoundingChangedEvent = (e, eh) => { };
            placementBoundingsSyncer.UnregisterLocalBoundingChangedEvent = (e, eh) => { };

            Scene.Root.AddChild(map.Ground);
            Scene.Root.AddChild(map.StaticsRoot);
            Scene.Root.AddChild(map.DynamicsRoot);
            Scene.Root.AddChild(new Client.Game.Water(map));
            ((Graphics.LookatSphericalCamera)Scene.Camera).Lookat = map.MainCharacter.Translation;
            //cameraInputHandler.UpdateCamera();

            GroundProbe = new WorldViewProbe(this, Scene.Camera)
            {
                WorldProbe = new Client.Game.GroundProbe(map)
            };

            foreach (var v in Scene.AllEntities)
            {
                var ge = v as Client.Game.Map.GameEntity;
                if (ge != null)
                {
                    var ray = new Ray(ge.Translation + Vector3.UnitZ * 1000, -Vector3.UnitZ);
                    float d;
                    if (GroundProbe.Intersect(ray, this, out d))
                    {
                        var p = ray.Position + ray.Direction * d;
                        ge.EditorHeight = (ge.Translation - p).Z;
                    }
                }
            }

            StartDefaultMode();
        }