public void OnClick(CommonTouchContral.TouchCursor t) { PuzzlePusher p = Instantiate(samplePusher, container.transform); p.SetPuzzleType((PuzzleTile.PType)randomPuzzleTypeTable.Get()); container.AddPusher(dir); }
void DropPuzzle() { int c = randomPuzzleColTable.Get(); PuzzleTile p = Instantiate(samplePuzzle, transform.position, Quaternion.identity, container.transform).GetComponent <PuzzleTile>(); p.col = c; p.SetPuzzleType((PuzzleTile.PType)randomPuzzleTypeTable.Get()); container.DropPuzzle(c, p); }
public void InsertPuzzle() { float yOffset = -1f; while (insertQuery > 0) { for (int i = 0; i < width; i++) { PuzzleTile p = Instantiate(samplePuzzle, puzzleOffset + new Vector3(i, yOffset, 0f), Quaternion.identity, transform); p.SetPuzzleType((PuzzleTile.PType)randomTable.Get()); p.SetContainer(this); puzzleMap[i].Insert(0, p); } yOffset -= 1f; insertQuery--; } textInsertCount.UpdateText(insertQuery.ToString()); }