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(); }
public void SetEdge(MazeDirectionEnum direction, MazeCellEdge edge) { edges[(int)direction] = edge; initializedEdgeCount += 1; }
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]); }