12 foreach (
Area area
in this.listArea)
16 foreach (
Room room
in this.listRoom)
24 public void AssignCharas()
29 public void RefreshAll()
31 foreach (
Room room
in this.listRoom)
43 foreach (
Room room
in this.listRoom)
67 if (!this.listArea.Contains(a))
70 this.mapIDs.Add(a.uid, a);
72 a.AddPoint(p.Copy(),
false);
83 if (existingArea ==
null)
85 existingArea =
Area.Create(
"public");
86 this.listArea.Add(existingArea);
87 this.mapIDs.Add(existingArea.uid, existingArea);
89 existingArea.AddPoint(p.Copy(),
false);
94 public void RemoveArea(
Area a)
96 this.listArea.Remove(a);
97 this.mapIDs.Remove(a.uid);
104 this.listRoom.Add(r);
107 this.mapIDs.Add(r.uid, r);
112 public void RemoveRoom(
Room r)
114 this.listRoom.Remove(r);
115 this.mapIDs.Remove(r.uid);
120 public HitResult GetHitResult(
Point point,
Point start)
122 if (point.area !=
null)
124 return HitResult.Invalid;
128 return HitResult.Valid;
130 return HitResult.Default;
134 public void RebuildLots()
136 this.listLot.Clear();
137 foreach (
Room room
in this.listRoom)
141 foreach (
Room room2
in this.listRoom)
143 if (room2.lot ==
null)
152 lot.SetBaseRoom(room2);
153 this.listLot.Add(lot);
156 this.dirtyLots =
false;
160 public BaseArea FindBaseArea(
string id)
162 this.tempList.Clear();
163 foreach (
BaseArea baseArea
in this.listRoom.Concat(
this.listArea))
165 if (baseArea.type.id ==
id)
167 this.tempList.Add(baseArea);
170 if (this.tempList.Count == 0)
174 return this.tempList.RandomItem<
BaseArea>();
178 private List<BaseArea> tempList =
new List<BaseArea>();
182 public List<Area> listArea =
new List<Area>();
186 public List<Room> listRoom =
new List<Room>();
190 public int uidRoom = 1;
193 public Dictionary<int, BaseArea> mapIDs =
new Dictionary<int, BaseArea>();
196 public List<Lot> listLot =
new List<Lot>();
199 public bool dirtyLots;
202 public bool dirtyRooms;