private void SpawnCharacter(int playerID) { Vector2Int coordinates = currentMaze.RandomCoordinate; BoardSpace space = currentMaze.GetSpace(coordinates); Character character = Instantiate(characterPrefab, transform); character.Spawn(currentMaze, space, playerID); characters.Add(character); }
public void LookDirection(Direction dir, int range) { currentTile.isVisible = true; Vector2Int searchSpace = currentTile.coordinates; int distance = 0; BoardSpace next = currentTile; while (!next.GetEdge(dir).blocked&& distance < range) { searchSpace += dir.ToCoordinates(); next = boardGenerator.GetSpace(searchSpace); next.isVisible = true; distance++; } }