Beispiel #1
0
        //inform the floorplan that a point has been modified
        //check to see if this point affects this plan
        public void PointModified(List <RoomPoint> data)
        {
            int dataCount = data.Count;

            if (data.Count == 0)
            {
                return;
            }
            int pointCount = numberOfPoints;

            for (int d = 0; d < dataCount; d++)
            {
                RoomPoint point = data[d];
                if (!point.moved)
                {
                    continue;
                }
                for (int p = 0; p < pointCount; p++)
                {
                    if (point.lastPosition == _points[p].position)
                    {
                        _points[p].position = point.position;
                        _points[p].MarkUnmodified();
                    }
                }
            }
            if (isModified)
            {
                MarkModified();
            }
        }
Beispiel #2
0
 public bool Equals(RoomPoint p)
 {
     if (_position != p._position)
     {
         return(false);
     }
     return(true);
 }
Beispiel #3
0
        public void AddPoint(Vector2Int newPosition)
        {
            RoomPoint newPoint = new RoomPoint(newPosition);

            _points.Add(newPoint);
            CheckPlan();
            MarkModified();
        }
Beispiel #4
0
        public RoomPoint Clone()
        {
            RoomPoint output = new RoomPoint(_position);

            return(output);
        }