public void Initialize(MazeCell cell, MazeCell otherCell, MazeDirectionEnum 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();
 }
Exemple #2
0
 public void SetEdge(MazeDirectionEnum direction, MazeCellEdge edge)
 {
     edges[(int)direction] = edge;
     initializedEdgeCount += 1;
 }
Exemple #3
0
 public MazeCellEdge GetEdge(MazeDirectionEnum direction)
 {
     return(edges[(int)direction]);
 }
 public static Quaternion ToRotation(this MazeDirectionEnum direction)
 {
     return(rotations[(int)direction]);
 }
 public static MazeDirectionEnum GetReverse(this MazeDirectionEnum direction)
 {
     return(reverse[(int)direction]);
 }
 public static IntVector2 ToIntVector2(this MazeDirectionEnum direction)
 {
     return(vectors[(int)direction]);
 }