コード例 #1
0
ファイル: Painting.cs プロジェクト: a-jih/vr_museum
 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();
 }
コード例 #2
0
ファイル: Cell.cs プロジェクト: AtharBagunaid/Maze-Generation
    public Transform CreateWall(CellDirection direction)
    {
        Transform wall = Instantiate(wallPrefab);

        wall.transform.parent = transform;
        wall.localPosition    = Vector3.zero;
        wall.localRotation    = direction.ToRotation();
        return(wall);
    }
コード例 #3
0
ファイル: CellEdge.cs プロジェクト: xytan123/eecs395-game
	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();
	}
コード例 #4
0
ファイル: Cell.cs プロジェクト: AtharBagunaid/Maze-Generation
    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;
    }
コード例 #5
0
ファイル: Map.cs プロジェクト: xytan123/eecs395-game
	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;

		} 
	}