public void Initialize(MazeCell cell, MazeCell otherCell, LevelGenerator.MazeDirection 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 MazeCellEdge GetEdge(LevelGenerator.MazeDirection direction) { return(edges[(int)direction]); }
public void SetEdge(LevelGenerator.MazeDirection direction, MazeCellEdge edge) { edges[(int)direction] = edge; initializedEdgeCount += 1; }
public static Quaternion ToRotation(this LevelGenerator.MazeDirection direction) { return(rotations[(int)direction]); }
public static Vector2Int ToVector2Int(this LevelGenerator.MazeDirection direction) { return(vectors[(int)direction]); }
public static LevelGenerator.MazeDirection GetOpposite(this LevelGenerator.MazeDirection direction) { return(opposites[(int)direction]); }