private void OnRemoveWall(Vector3 pz) { WallPoint wp = new WallPoint(Mathf.RoundToInt(pz.x), Mathf.RoundToInt(pz.y)); if (IsInsideBuilding(wp)) { DeleteWall(wp); WallController w; w = GetWall(new WallPoint(wp.X + 1, wp.Y)); if (w != null && w.PrefabIsDoor()) { DeleteWall(w.Position); } w = GetWall(new WallPoint(wp.X - 1, wp.Y)); if (w != null && w.PrefabIsDoor()) { DeleteWall(w.Position); } w = GetWall(new WallPoint(wp.X, wp.Y + 1)); if (w != null && w.PrefabIsDoor()) { DeleteWall(w.Position); } w = GetWall(new WallPoint(wp.X, wp.Y - 1)); if (w != null && w.PrefabIsDoor()) { DeleteWall(w.Position); } } }
IEnumerator MoveWalls() { float passedTime = 0; while (true) { //get the fraction of time to total time passedTime += Time.deltaTime * GameManager.Instance.TimeScale; float percentageComplete = Pulse(passedTime); for (int i = 0; i < wallPoints.Count; ++i) { //move the walls WallPoint firstWallPoint = wallPoints[i]; WallPoint secondWallPoint = wallPoints[(i + 1) % wallPoints.Count]; Vector3 firstPoint = GetCurrentLocation(firstWallPoint, percentageComplete); Vector3 secondPoint = GetCurrentLocation(secondWallPoint, percentageComplete); UpdateWallToPoints(walls[i], firstPoint, secondPoint); //move the corners UpdateCornerToPoint(corners[i], firstPoint); } yield return(null); } }
public bool Process (Segmentator s, ILogicObject o) { bool res = false; if(o.ObjectType == CellObjects.Heater || o.ObjectType == CellObjects.HeatingPipe || o.ObjectType == CellObjects.Sink || o.ObjectType == CellObjects.Toilet) return false; o.ObjectRect.Foreach((MapPoint p) => { WallPoint wp; wp = new WallPoint(p.X,p.Y); if(s.Doors.ContainsKey(wp.toInt())) res = true; wp = new WallPoint(p.X+1,p.Y); if(s.Doors.ContainsKey(wp.toInt())) res = true; wp = new WallPoint(p.X,p.Y+1); if(s.Doors.ContainsKey(wp.toInt())) res = true; wp = new WallPoint(p.X+1,p.Y+1); if(s.Doors.ContainsKey(wp.toInt())) res = true; }); return res; }
private void SetAdjacentWall(WallController wall, Side side) { WallPoint wp = wall.Position; WallPoint adjWallPoint = null; switch (side) { case Side.Bottom: adjWallPoint = new WallPoint(wp.X, wp.Y - 1); break; case Side.Left: adjWallPoint = new WallPoint(wp.X - 1, wp.Y); break; case Side.Right: adjWallPoint = new WallPoint(wp.X + 1, wp.Y); break; case Side.Top: adjWallPoint = new WallPoint(wp.X, wp.Y + 1); break; } WallController adjWall = GetWall(adjWallPoint); if (adjWall == null) { if (WallPrefab.PrefabValidatePosition(M, adjWallPoint)) { wall.wallSprite.SetSide(side, true); SetWall(adjWallPoint, WallPrefab); } } else if (adjWall.WallObject == null) { wall.wallSprite.SetSide(side, true); } }
private bool PrefabGetNeighbours(Manager m, WallPoint point, out WallController w1, out WallController w2) { w1=null;w2=null; WallController left = m.House.GetWall(new WallPoint(point.X-1,point.Y)); WallController right = m.House.GetWall(new WallPoint(point.X+1,point.Y)); WallController top = m.House.GetWall(new WallPoint(point.X,point.Y+1)); WallController bottom = m.House.GetWall(new WallPoint(point.X,point.Y-1)); WallController cur = m.House.GetWall(point); if(cur!=null && cur.WallObject!=null) return false; if(left!=null && right!=null) { if(top!=null || bottom!=null) return false; w1 = left;w2=right; } else if(top!=null && bottom!=null) { if(left!=null || right!=null) return false; w1 = bottom;w2 = top; } else return false; return true; }
public void PlaceIndicators(Dictionary <int, CellController> cells, Dictionary <int, WallController> walls, WallController wallPrefab) { bool isDoor = wallPrefab.PrefabIsDoor(); foreach (CellController c in cells.Values) { if (c.IsMultiCell) { MapRect rect = c.GetCurCellIndexes(); rect.Foreach((MapPoint p) => { WallPoint wp = new WallPoint(p.X, p.Y); if ((isDoor || !walls.ContainsKey(wp.toInt())) && wallPrefab.PrefabValidatePosition(M, wp)) { InstantiateIndicator(wp, isDoor); } }); } else { WallPoint wp = new WallPoint(c.Position.X, c.Position.Y); if ((isDoor || !walls.ContainsKey(wp.toInt())) && wallPrefab.PrefabValidatePosition(M, wp)) { InstantiateIndicator(wp, isDoor); } } } }
public LogicWall (WallPoint point, bool top, bool bottom, bool left, bool right) { Position = point; Top = top; Bottom = bottom; Left = left; Right = right; }
public void Foreach(System.Action <WallPoint, Side> action) { for (int i = 0; i < 4; i++) { WallPoint ip = new WallPoint(X + xtable[i], Y + ytable[i]); action(ip, sidetable[i]); } }
public void Foreach(System.Action<WallPoint,Side> action) { for(int i=0;i<4;i++) { WallPoint ip = new WallPoint(X+xtable[i],Y+ytable[i]); action(ip,sidetable[i]); } }
public LogicWall(WallPoint point, bool top, bool bottom, bool left, bool right) { Position = point; Top = top; Bottom = bottom; Left = left; Right = right; }
public WallPoint GetWallPositionFromMouseLocation() { // round the numbers to the nearest whole number using 5 decimal place precision WallPoint pos = new WallPoint( (int)System.Math.Round(mouseHitPos.x+0.5f, 5, System.MidpointRounding.ToEven), (int)System.Math.Round(mouseHitPos.y+0.5f, 5, System.MidpointRounding.ToEven)); return pos; }
public WallPoint GetWallPositionFromMouseLocation() { // round the numbers to the nearest whole number using 5 decimal place precision WallPoint pos = new WallPoint( (int)System.Math.Round(mouseHitPos.x + 0.5f, 5, System.MidpointRounding.ToEven), (int)System.Math.Round(mouseHitPos.y + 0.5f, 5, System.MidpointRounding.ToEven)); return(pos); }
public WallController GetWall(WallPoint point) { if (walls.ContainsKey(point.toInt())) { return(walls[point.toInt()]); } return(null); }
void InstantiateIndicator(WallPoint p, bool isDoor) { if(indicators.ContainsKey(p.toInt())) return; Transform ph = Instantiate<Transform>(isDoor?DoorIndicator:PlaceIndicator); ph.parent = transform; ph.localPosition = new Vector3(p.X,p.Y,0); indicators.Add(p.toInt(),ph); }
public void EditorRemoveWall(WallPoint point) { WallController w = null; if (walls.TryGetValue(point.toInt(), out w)) { GameObject.DestroyImmediate(w.gameObject); walls.Remove(point.toInt()); } }
public bool IsInsideBuilding(WallPoint wallPoint) { bool res = cells.ContainsKey(wallPoint.toInt()) && cells.ContainsKey(new WallPoint(wallPoint.X - 1, wallPoint.Y).toInt()) && cells.ContainsKey(new WallPoint(wallPoint.X, wallPoint.Y - 1).toInt()) && cells.ContainsKey(new WallPoint(wallPoint.X - 1, wallPoint.Y - 1).toInt()); return(res); }
private void DeleteWall(WallPoint wp) { WallController wall = GetWall(wp); if (wall != null) { Destroy(wall.gameObject); walls.Remove(wp.toInt()); UpdateWallsAround(wp); } }
//public void ForeachWall(System.Action<WallPoint,WallController> action) //{ //} public WallController PrefabSetWall(Manager m, WallPoint point) { IWallObject wo = GetComponentInterface <IWallObject>(); WallController w = m.House.ReplaceWall(point, this); if (wo != null) { wo.PrefabPrepareWall(m, w); } return(w); }
public bool PrefabValidatePosition(Manager m, WallPoint point) { WallController w1,w2; if(!PrefabGetNeighbours(m,point,out w1,out w2)) return false; if(w1.WallObject!=null || w2.WallObject!=null) return false; return true; }
private void PlaceWall(HouseController hc, WallPoint p, WallController prefab) { if (hc.GetWall(p) == null) { return; } hc.EditorRemoveWall(p); WallController w = hc.SetWall(p, prefab); w.EditorUpdateWall(); }
void InstantiateIndicator(WallPoint p, bool isDoor) { if (indicators.ContainsKey(p.toInt())) { return; } Transform ph = Instantiate <Transform>(isDoor?DoorIndicator:PlaceIndicator); ph.parent = transform; ph.localPosition = new Vector3(p.X, p.Y, 0); indicators.Add(p.toInt(), ph); }
private void UpdateWallsAround(WallPoint wp) { for (int x = wp.X - 1; x <= wp.X + 1; x++) { for (int y = wp.Y - 1; y <= wp.Y + 1; y++) { WallController w = GetWall(new WallPoint(x, y)); if (w != null) { w.UpdateWall(); } } } }
public bool PrefabValidatePosition(Manager m, WallPoint point) { WallController w1, w2; if (!PrefabGetNeighbours(m, point, out w1, out w2)) { return(false); } if (w1.WallObject != null || w2.WallObject != null) { return(false); } return(true); }
public void ForEachWall(MapPoint point, Action <WallPoint, WallController, Corner> action) { WallController wc = null; WallPoint wp; for (int i = 0; i < 4; i++) { wp = new WallPoint(point.X + i % 2, point.Y + (i > 1?1:0)); if (wp.X < 0 || wp.Y < 0) { continue; } walls.TryGetValue(wp.toInt(), out wc); action(wp, wc, cornersTable[i]); wc = null; } }
public void PrefabPrepareWall(Manager m, WallController wc) { WallPoint point = wc.Position; WallController left = m.House.GetWall(new WallPoint(point.X - 1, point.Y)); WallController right = m.House.GetWall(new WallPoint(point.X + 1, point.Y)); if (left != null && right != null) { wc.wallSprite.Left = true; wc.wallSprite.Right = true; } else { wc.wallSprite.Top = true; wc.wallSprite.Bottom = true; } }
public WallController ReplaceWall(WallPoint point, WallController prefab) { if (point.X < 0 || point.Y < 0 || point.X > 0xffff || point.Y > 0xffff) { return(null); } WallController res = null; int key = point.toInt(); if (walls.ContainsKey(key)) { GameObject.Destroy(walls[key].gameObject); walls.Remove(key); } res = SetWall(point, prefab); return(res); }
public bool Process(Segmentator s, ILogicObject o) { bool res = false; if (o.ObjectType == CellObjects.Heater || o.ObjectType == CellObjects.HeatingPipe || o.ObjectType == CellObjects.Sink || o.ObjectType == CellObjects.Toilet) { return(false); } o.ObjectRect.Foreach((MapPoint p) => { WallPoint wp; wp = new WallPoint(p.X, p.Y); if (s.Doors.ContainsKey(wp.toInt())) { res = true; } wp = new WallPoint(p.X + 1, p.Y); if (s.Doors.ContainsKey(wp.toInt())) { res = true; } wp = new WallPoint(p.X, p.Y + 1); if (s.Doors.ContainsKey(wp.toInt())) { res = true; } wp = new WallPoint(p.X + 1, p.Y + 1); if (s.Doors.ContainsKey(wp.toInt())) { res = true; } }); return(res); }
private float frequency; // Frequency in Hz void Start() { //set the wall points to whatever is input List <RectTransform> startTransforms = startPoints.GetComponentsInChildren <RectTransform>().ToList(); List <RectTransform> finishTransfroms = endPoints.GetComponentsInChildren <RectTransform>().ToList(); Debug.Assert(startTransforms.Count == finishTransfroms.Count); // -1 for the first point, which is the root int numPoints = startTransforms.Count - 1; for (int i = 1; i < startTransforms.Count; ++i) { wallPoints.Add(new WallPoint(startTransforms[i].gameObject, finishTransfroms[i].gameObject)); } //set frequency frequency = 1 / cycleLength; //grab the start time startTime = Time.time; //spawn in the walls and corners for (int i = 0; i < wallPoints.Count; ++i) { WallPoint firstWallPoint = wallPoints[i]; WallPoint secondWallPoint = wallPoints[(i + 1) % wallPoints.Count]; GameObject wall = Instantiate(wallPrefab, transform); UpdateWallToPoints(wall, firstWallPoint.startLocation, secondWallPoint.startLocation); walls.Add(wall); //corner GameObject corner = Instantiate(wallPrefab, transform); UpdateCornerToPoint(corner, firstWallPoint.startLocation); corners.Add(corner); } StartCoroutine(MoveWalls()); }
public bool PrefabValidatePosition(Manager m, WallPoint point) { IWallObject wo = GetComponentInterface <IWallObject>(); if (wo != null && wo.PrefabValidatePosition(m, point) == false) { return(false); } if (!m.House.IsInsideBuilding(point)) { return(false); } WallController w = null; w = m.House.GetWall(new WallPoint(point.X - 1, point.Y)); if (w != null && w.WallObject != null) { return(false); } w = m.House.GetWall(new WallPoint(point.X + 1, point.Y)); if (w != null && w.WallObject != null) { return(false); } w = m.House.GetWall(new WallPoint(point.X, point.Y - 1)); if (w != null && w.WallObject != null) { return(false); } w = m.House.GetWall(new WallPoint(point.X, point.Y + 1)); if (w != null && w.WallObject != null) { return(false); } return(true); }
private bool PrefabGetNeighbours(Manager m, WallPoint point, out WallController w1, out WallController w2) { w1 = null; w2 = null; WallController left = m.House.GetWall(new WallPoint(point.X - 1, point.Y)); WallController right = m.House.GetWall(new WallPoint(point.X + 1, point.Y)); WallController top = m.House.GetWall(new WallPoint(point.X, point.Y + 1)); WallController bottom = m.House.GetWall(new WallPoint(point.X, point.Y - 1)); WallController cur = m.House.GetWall(point); if (cur != null && cur.WallObject != null) { return(false); } if (left != null && right != null) { if (top != null || bottom != null) { return(false); } w1 = left; w2 = right; } else if (top != null && bottom != null) { if (left != null || right != null) { return(false); } w1 = bottom; w2 = top; } else { return(false); } return(true); }
public WallController SetWall(WallPoint point, WallController prefab) { if (point.X < 0 || point.Y < 0 || point.X > 0xffff || point.Y > 0xffff) { return(null); } WallController res = null; int key = point.toInt(); if (!walls.ContainsKey(key)) { WallController newWall = Instantiate <WallController>(prefab); newWall.transform.parent = transform; newWall.Position = point; walls.Add(key, newWall); res = newWall; } else { res = walls[key]; } return(res); }
public void EditorRemoveWall(WallPoint point) { WallController w = null; if(walls.TryGetValue(point.toInt(),out w)) { GameObject.DestroyImmediate(w.gameObject); walls.Remove(point.toInt()); } }
public void PlaceIndicators(Dictionary<int, CellController> cells, Dictionary<int, WallController> walls, WallController wallPrefab) { bool isDoor = wallPrefab.PrefabIsDoor(); foreach(CellController c in cells.Values) { if(c.IsMultiCell) { MapRect rect = c.GetCurCellIndexes(); rect.Foreach((MapPoint p) => { WallPoint wp = new WallPoint(p.X,p.Y); if( (isDoor || !walls.ContainsKey(wp.toInt())) && wallPrefab.PrefabValidatePosition(M,wp)) InstantiateIndicator(wp, isDoor); }); } else { WallPoint wp = new WallPoint(c.Position.X,c.Position.Y); if( (isDoor || !walls.ContainsKey(wp.toInt())) && wallPrefab.PrefabValidatePosition(M,wp)) InstantiateIndicator(wp, isDoor); } } }
public Door(WallPoint position) { Position = position; }
//public void ForeachWall(System.Action<WallPoint,WallController> action) //{ //} public WallController PrefabSetWall(Manager m, WallPoint point) { IWallObject wo = GetComponentInterface<IWallObject>(); WallController w = m.House.ReplaceWall(point,this); if(wo!=null) { wo.PrefabPrepareWall(m,w); } return w; }
Vector3 GetCurrentLocation(WallPoint wp, float percentage) { return(Vector3.Lerp(wp.startLocation, wp.endLocation, percentage)); }
private void DeleteWall(WallPoint wp) { WallController wall = GetWall(wp); if(wall!=null) { Destroy(wall.gameObject); walls.Remove(wp.toInt()); UpdateWallsAround(wp); } }
public WallController GetWall(WallPoint point) { if(walls.ContainsKey(point.toInt())) return walls[point.toInt()]; return null; }
public WallController ReplaceWall(WallPoint point, WallController prefab) { if(point.X<0 || point.Y<0 || point.X>0xffff || point.Y>0xffff) return null; WallController res = null; int key = point.toInt(); if(walls.ContainsKey(key)) { GameObject.Destroy(walls[key].gameObject); walls.Remove(key); } res = SetWall(point, prefab); return res; }
public void ForEachWall(MapPoint point, Action<WallPoint,WallController,Corner> action) { WallController wc = null; WallPoint wp; for(int i=0;i<4;i++) { wp = new WallPoint(point.X+i%2,point.Y+(i>1?1:0)); if(wp.X<0 || wp.Y<0) continue; walls.TryGetValue(wp.toInt(),out wc); action(wp,wc,cornersTable[i]); wc = null; } }
public bool IsInsideBuilding(WallPoint wallPoint) { bool res = cells.ContainsKey(wallPoint.toInt()) && cells.ContainsKey(new WallPoint(wallPoint.X-1,wallPoint.Y).toInt()) && cells.ContainsKey(new WallPoint(wallPoint.X,wallPoint.Y-1).toInt()) && cells.ContainsKey(new WallPoint(wallPoint.X-1,wallPoint.Y-1).toInt()) ; return res; }
public Door (WallPoint position) { Position = position; }
public WallController SetWall(WallPoint point, WallController prefab) { if(point.X<0 || point.Y<0 || point.X>0xffff || point.Y>0xffff) return null; WallController res = null; int key = point.toInt(); if(!walls.ContainsKey(key)) { WallController newWall = Instantiate<WallController>(prefab); newWall.transform.parent = transform; newWall.Position = point; walls.Add(key,newWall); res = newWall; } else res = walls[key]; return res; }
public bool PrefabValidatePosition(Manager m, WallPoint point) { return(false); }
private void OnPlaceWall(Vector3 pz, bool door) { WallController wallPrefab = selectedPrefab.GetComponent<WallController>(); WallPoint wp = new WallPoint(Mathf.RoundToInt(pz.x),Mathf.RoundToInt(pz.y)); Side side; if(new Rect(wp.X-0.25f,wp.Y-0.25f,0.5f,0.5f).Contains(pz)) { side = Side.Middle; } else if(new Rect(wp.X-0.5f,wp.Y-0.25f,0.25f,0.5f).Contains(pz)) { side = Side.Left; } else if(new Rect(wp.X-0.25f,wp.Y+0.25f,0.5f,0.25f).Contains(pz)) { side = Side.Top; } else if(new Rect(wp.X+0.25f,wp.Y-0.25f,0.25f,0.5f).Contains(pz)) { side = Side.Right; } else if(new Rect(wp.X-0.25f,wp.Y-0.5f,0.5f,0.25f).Contains(pz)) { side = Side.Bottom; } else { side = Side.Undefined; } if(side==Side.Undefined) return; //new Rect(wp.X-0.5f,wp.Y-0.5f,wp.X+0.5f,wp.Y+0.5f).Contains(pz) if(IsInsideBuilding(wp)) { WallController wall = null, adjWall=null; if(side==Side.Middle) { wall = wallPrefab.PrefabSetWall(M,wp); } else { wall = wallPrefab.PrefabSetWall(M,wp); SetAdjacentWall(wall,side); } UpdateWallsAround(wp); } else { // not inside building WallController wall = GetWall(wp); if(wall!=null && wall.WallObject==null) { wp.Foreach( (WallPoint p, Side wallSide) => { if(wallPrefab.PrefabValidatePosition(M,p) && side == wallSide) SetAdjacentWall(wall,side); }); UpdateWallsAround(wp); } } Phantom.RemoveIndicators(); Phantom.PlaceIndicators(cells,walls,wallPrefab); }
private void UpdateWallsAround(WallPoint wp) { for(int x = wp.X-1;x<=wp.X+1;x++) { for(int y = wp.Y-1;y<=wp.Y+1;y++) { WallController w = GetWall(new WallPoint(x,y)); if(w!=null) w.UpdateWall(); } } }
private void OnRemoveWall(Vector3 pz) { WallPoint wp = new WallPoint(Mathf.RoundToInt(pz.x),Mathf.RoundToInt(pz.y)); if(IsInsideBuilding(wp)) { DeleteWall(wp); WallController w; w = GetWall(new WallPoint(wp.X+1,wp.Y)); if(w!=null && w.PrefabIsDoor()) DeleteWall(w.Position); w = GetWall(new WallPoint(wp.X-1,wp.Y)); if(w!=null && w.PrefabIsDoor()) DeleteWall(w.Position); w = GetWall(new WallPoint(wp.X,wp.Y+1)); if(w!=null && w.PrefabIsDoor()) DeleteWall(w.Position); w = GetWall(new WallPoint(wp.X,wp.Y-1)); if(w!=null && w.PrefabIsDoor()) DeleteWall(w.Position); } }
private void OnPlaceWall(Vector3 pz, bool door) { WallController wallPrefab = selectedPrefab.GetComponent <WallController>(); WallPoint wp = new WallPoint(Mathf.RoundToInt(pz.x), Mathf.RoundToInt(pz.y)); Side side; if (new Rect(wp.X - 0.25f, wp.Y - 0.25f, 0.5f, 0.5f).Contains(pz)) { side = Side.Middle; } else if (new Rect(wp.X - 0.5f, wp.Y - 0.25f, 0.25f, 0.5f).Contains(pz)) { side = Side.Left; } else if (new Rect(wp.X - 0.25f, wp.Y + 0.25f, 0.5f, 0.25f).Contains(pz)) { side = Side.Top; } else if (new Rect(wp.X + 0.25f, wp.Y - 0.25f, 0.25f, 0.5f).Contains(pz)) { side = Side.Right; } else if (new Rect(wp.X - 0.25f, wp.Y - 0.5f, 0.5f, 0.25f).Contains(pz)) { side = Side.Bottom; } else { side = Side.Undefined; } if (side == Side.Undefined) { return; } //new Rect(wp.X-0.5f,wp.Y-0.5f,wp.X+0.5f,wp.Y+0.5f).Contains(pz) if (IsInsideBuilding(wp)) { WallController wall = null, adjWall = null; if (side == Side.Middle) { wall = wallPrefab.PrefabSetWall(M, wp); } else { wall = wallPrefab.PrefabSetWall(M, wp); SetAdjacentWall(wall, side); } UpdateWallsAround(wp); } else { // not inside building WallController wall = GetWall(wp); if (wall != null && wall.WallObject == null) { wp.Foreach((WallPoint p, Side wallSide) => { if (wallPrefab.PrefabValidatePosition(M, p) && side == wallSide) { SetAdjacentWall(wall, side); } }); UpdateWallsAround(wp); } } Phantom.RemoveIndicators(); Phantom.PlaceIndicators(cells, walls, wallPrefab); }
private void SetAdjacentWall(WallController wall, Side side) { WallPoint wp = wall.Position; WallPoint adjWallPoint = null; switch(side) { case Side.Bottom: adjWallPoint=new WallPoint(wp.X,wp.Y-1); break; case Side.Left: adjWallPoint=new WallPoint(wp.X-1,wp.Y); break; case Side.Right: adjWallPoint=new WallPoint(wp.X+1,wp.Y); break; case Side.Top: adjWallPoint=new WallPoint(wp.X,wp.Y+1); break; } WallController adjWall = GetWall(adjWallPoint); if(adjWall==null) { if(WallPrefab.PrefabValidatePosition(M,adjWallPoint)) { wall.wallSprite.SetSide(side,true); SetWall(adjWallPoint, WallPrefab); } } else if(adjWall.WallObject==null) { wall.wallSprite.SetSide(side,true); } }
private void PlaceWall(HouseController hc, WallPoint p, WallController prefab) { if(hc.GetWall(p)==null) return; hc.EditorRemoveWall(p); WallController w = hc.SetWall(p,prefab); w.EditorUpdateWall(); }
public bool PrefabValidatePosition(Manager m, WallPoint point) { return false; }
public bool PrefabValidatePosition(Manager m, WallPoint point) { IWallObject wo = GetComponentInterface<IWallObject>(); if(wo!=null && wo.PrefabValidatePosition(m,point)==false) return false; if(!m.House.IsInsideBuilding(point)) return false; WallController w = null; w = m.House.GetWall(new WallPoint(point.X-1,point.Y)); if(w!=null && w.WallObject!=null) return false; w = m.House.GetWall(new WallPoint(point.X+1,point.Y)); if(w!=null && w.WallObject!=null) return false; w = m.House.GetWall(new WallPoint(point.X,point.Y-1)); if(w!=null && w.WallObject!=null) return false; w = m.House.GetWall(new WallPoint(point.X,point.Y+1)); if(w!=null && w.WallObject!=null) return false; return true; }