///////////////////////////////// Maze Doors Genearator//////////////////////////////////// public override void SetDoors() { GetToTarget = new MazeCellNode[5]; if ((roomInstance.roomDoors & MydirectionData.DirectionEnum.Down) != MydirectionData.DirectionEnum.Notready) { GetToTarget[(int)MydirectionData.DirToSquareVert(MydirectionData.DirectionEnum.Down)] = cells[0, 0].node; } if ((roomInstance.roomDoors & MydirectionData.DirectionEnum.Left) != MydirectionData.DirectionEnum.Notready) { GetToTarget[(int)MydirectionData.DirToSquareVert(MydirectionData.DirectionEnum.Left)] = cells[0, cMax - 1].node; } if ((roomInstance.roomDoors & MydirectionData.DirectionEnum.Right) != MydirectionData.DirectionEnum.Notready) { GetToTarget[(int)MydirectionData.DirToSquareVert(MydirectionData.DirectionEnum.Right)] = cells[rMax - 1, 0].node; } if ((roomInstance.roomDoors & MydirectionData.DirectionEnum.Up) != MydirectionData.DirectionEnum.Notready) { GetToTarget[(int)MydirectionData.DirToSquareVert(MydirectionData.DirectionEnum.Up)] = cells[rMax - 1, cMax - 1].node; } GetToTarget[(int)MydirectionData.SquareVertEnum.Middle] = cells[(int)rMax / 2, (int)cMax / 2].node; }
public void InitMazeCell(IntVector2 coord, Vector3 _worldPos) { node = new MazeCellNode(coord, _worldPos); }