public void Initialize(MuseumCell cell, CellDirection direction) { this.cell = cell; this.direction = direction; transform.parent = cell.transform; transform.localPosition = Vector3.zero; transform.localRotation = direction.ToRotation(); }
public Transform CreateWall(CellDirection direction) { Transform wall = Instantiate(wallPrefab); wall.transform.parent = transform; wall.localPosition = Vector3.zero; wall.localRotation = direction.ToRotation(); return(wall); }
public void Initialize (MapCell cell, MapCell otherCell, CellDirection direction) { this.cell = cell; this.otherCell = otherCell; this.direction = direction; cell.SetEdge(direction, this); transform.parent = cell.transform; transform.localPosition = Vector3.zero; transform.localRotation = direction.ToRotation(); }
public void AddConnection(CellDirection direction) { Transform connection = Instantiate(connectionPrefab); connection.transform.parent = transform; connection.localPosition = Vector3.zero; connection.localRotation = direction.ToRotation(); connection.gameObject.SetActive(pathVisible); connections[direction] = connection; }
private void CreateDesk (MapCell cell, MapCell otherCell, CellDirection direction) { if(cell == null) return; Desk desk = Instantiate(deskPrefab) as Desk; // desk.Initialize(cell, otherCell, direction); desk.transform.localPosition = cell.transform.localPosition+ new Vector3(0, 1,0); cell.hasdesk = true; desk.transform.parent = cell.transform; if(!otherCell.hasdesk){ Colleague colleague = Instantiate(matePrefab) as Colleague; colleague.transform.localRotation = direction.ToRotation(); colleague.transform.localPosition = cell.transform.localPosition+direction.ToVector3(); colleague.transform.parent = desk.transform; } }