public void GenerateLevel(int level) { int rows = Mathf.RoundToInt(gridSize.y / cellDiameter) + 1; int columns = Mathf.RoundToInt(gridSize.x / cellDiameter) + 1; lvlGenData = new LevelGenerationData(gridSize, cellDiameter, levelsList[level], rows, columns); AStarGenerationData ASGenData = new AStarGenerationData(gridSize, cellDiameter, thisTransform.position, columns, rows); GridBasics.GridGeneration(lvlGenData); aStarGrid.ProceedLevel(ASGenData); bonusTestManager.Launch(gridSize, thisTransform.position, cellDiameter); }
public void GenerateLevel(AStarGenerationData genData) { Init(genData); GenerateGrid(); aSGrid.ProceedLevel(this); }