コード例 #1
0
        public PuzzleDataController(int boardSize, int puzzlePieceCount)
        {
            PuzzleData               = new PuzzleData();
            PuzzleData.PuzzleBoard   = new PuzzleBoard(boardSize);
            this.maxPuzzlePieceCount = puzzlePieceCount;
            this.maxTriangleCount    = boardSize * boardSize;
            PuzzleData.PuzzlePieces  = new List <PuzzlePiece>();
            foreach (var contactPoint in PuzzleData.PuzzleBoard.ContactPoints)
            {
                allTriangles.AddRange(contactPoint.Triangles);
            }
            CreateMainPuzzlePieces(puzzlePieceCount);

            AssignRestOfTheLeftAvailableTrianglesToPuzzlePiece();
        }
コード例 #2
0
 public abstract void SetPuzzleData(PuzzleData data);
 public PuzzleDataVisualizerWithLineRenderers(PuzzleData data, Material material)
 {
     puzzleData     = data;
     materialPrefab = material;
 }
 public override void SetPuzzleData(PuzzleData data)
 {
     puzzleData = data;
 }