internal void AddWall(SceneObjectContainer obj, Transform t, int wallIndex, bool instancing) { WallInfo preWall = walls[wallIndex]; if (preWall.prefabObject != null) { GUIAuxiliar.Destroy(preWall.prefabObject); } WallInfo wall = new WallInfo(obj, t, preWall.position, instancing); walls[wallIndex] = wall; }
private void Remove(WallInfo wallInfo) { if (wallInfo.prefabObject != null) { GUIAuxiliar.Destroy(wallInfo.prefabObject); } var newWall = new WallInfo() { position = wallInfo.position }; }
public Cell(Vector3 middlePoint, Vector2 Size) { position = middlePoint; objectList = new List <ObjectInfo>(); walls = new WallInfo[4]; for (int i = 0; i < walls.Length; i++) { walls[i] = new WallInfo() { height = 0, transitable = true, prefabObject = null }; } size = Size / 2; walls[1].position = position + new Vector3(size.x, 0, 0); walls[0].position = position + new Vector3(0, 0, size.y); walls[3].position = position + new Vector3(-size.x, 0, 0); walls[2].position = position + new Vector3(0, 0, -size.y); }
public void RemoveWall(int index) { WallInfo preWall = walls[index]; Remove(preWall); }