Пример #1
0
 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();
 }
Пример #2
0
 public MazeCellEdge GetEdge(LevelGenerator.MazeDirection direction)
 {
     return(edges[(int)direction]);
 }
Пример #3
0
 public void SetEdge(LevelGenerator.MazeDirection direction, MazeCellEdge edge)
 {
     edges[(int)direction] = edge;
     initializedEdgeCount += 1;
 }
Пример #4
0
 public static Quaternion ToRotation(this LevelGenerator.MazeDirection direction)
 {
     return(rotations[(int)direction]);
 }
Пример #5
0
 public static Vector2Int ToVector2Int(this LevelGenerator.MazeDirection direction)
 {
     return(vectors[(int)direction]);
 }
Пример #6
0
 public static LevelGenerator.MazeDirection GetOpposite(this LevelGenerator.MazeDirection direction)
 {
     return(opposites[(int)direction]);
 }