Exemplo n.º 1
0
        public Room(Project project)
            : base(project)
        {
            Name = "Cave";
            Size = new Vector(3 * Settings.GridSize, 2 * Settings.GridSize);
            Position = new Vector(-Size.X / 2, -Size.Y / 2);

            // connections may connect to any of our "corners"
            PortList.Add(new CompassPort(CompassPoint.North, this));
            PortList.Add(new CompassPort(CompassPoint.NorthNorthEast, this));
            PortList.Add(new CompassPort(CompassPoint.NorthEast, this));
            PortList.Add(new CompassPort(CompassPoint.EastNorthEast, this));
            PortList.Add(new CompassPort(CompassPoint.East, this));
            PortList.Add(new CompassPort(CompassPoint.EastSouthEast, this));
            PortList.Add(new CompassPort(CompassPoint.SouthEast, this));
            PortList.Add(new CompassPort(CompassPoint.SouthSouthEast, this));
            PortList.Add(new CompassPort(CompassPoint.South, this));
            PortList.Add(new CompassPort(CompassPoint.SouthSouthWest, this));
            PortList.Add(new CompassPort(CompassPoint.SouthWest, this));
            PortList.Add(new CompassPort(CompassPoint.WestSouthWest, this));
            PortList.Add(new CompassPort(CompassPoint.West, this));
            PortList.Add(new CompassPort(CompassPoint.WestNorthWest, this));
            PortList.Add(new CompassPort(CompassPoint.NorthWest, this));
            PortList.Add(new CompassPort(CompassPoint.NorthNorthWest, this));
        }
Exemplo n.º 2
0
 private static void RaiseProjectChanged(Project oldProject, Project newProject)
 {
     var projectChanged = ProjectChanged;
     if (projectChanged != null)
     {
         projectChanged(null, new ProjectChangedEventArgs(oldProject, newProject));
     }
 }
Exemplo n.º 3
0
 private static void raiseProjectChanged(Project oldProject, Project newProject)
 {
     var projectChanged = ProjectChanged;
       projectChanged?.Invoke(null, new ProjectChangedEventArgs(oldProject, newProject));
 }
Exemplo n.º 4
0
 // Added to ignore ID gaps
 public Connection(Project project, Vertex a, Vertex b, int TotalIDs, params Vertex[] args)
     : this(project, a, b, TotalIDs)
 {
     foreach (var vertex in args)
       {
     VertexList.Add(vertex);
       }
 }
Exemplo n.º 5
0
 // Added to ignore ID gaps
 public Connection(Project project, Vertex a, Vertex b, int TotalIDs)
     : this(project, TotalIDs)
 {
     VertexList.Add(a);
       VertexList.Add(b);
 }
Exemplo n.º 6
0
 public Connection(Project project, Vertex a, Vertex b)
     : this(project)
 {
     VertexList.Add(a);
       VertexList.Add(b);
 }
Exemplo n.º 7
0
 // Added this second constructor to be used when loading a room
 // This constructor is significantly faster as it doesn't look for gap in the element IDs
 public Connection(Project project, int TotalIDs)
     : base(project, TotalIDs)
 {
     m_vertexList.Added += OnVertexAdded;
       m_vertexList.Removed += OnVertexRemoved;
 }
Exemplo n.º 8
0
 public Connection(Project project)
     : base(project)
 {
     m_vertexList.Added += OnVertexAdded;
       m_vertexList.Removed += OnVertexRemoved;
 }