public Vector3Int CreateEnd(Vector3Int startPosition, ref LevelInteractivesPositions interPositions) { Vector3Int endPos = new Vector3Int(0, 0, 0); int n = 0; int endEnd = 7; for (int i = n; i <= endEnd; i++) { wallTiles.SetTile(startPosition + new Vector3Int(i, -2, 0), walls[1]); wallTiles.SetTile(startPosition + new Vector3Int(i, -1, 0), walls[1]); wallTiles.SetTile(startPosition + new Vector3Int(i, 0, 0), walls[0]); wallTiles.SetTile(startPosition + new Vector3Int(i, 1, 0), walls[0]); wallTiles.SetTile(startPosition + new Vector3Int(i, 2, 0), walls[0]); groundTiles.SetTile(startPosition + new Vector3Int(i, 0, 0), grounds[0]); if (i == 3) { interPositions.levelLimiterRight = wallTiles.GetCellCenterWorld(startPosition + new Vector3Int(i, 0, 0)); } if (i == 2) { interPositions.contactMePortalEnd = wallTiles.GetCellCenterWorld(startPosition + new Vector3Int(i, 0, 0)); } if (i == 0) { interPositions.exitPortalEnd = wallTiles.GetCellCenterWorld(startPosition + new Vector3Int(i, 0, 0)); } if (i == endEnd) { endPos = startPosition + new Vector3Int(i, 0, 0); } } return(endPos); }
public Vector3Int CreateStart(Vector3Int startPosition, out LevelInteractivesPositions interPositions) { Vector3Int endPos = new Vector3Int(0, 0, 0); levelInteractives = new LevelInteractivesPositions(); int n = -7; int startEnd = 2; for (int i = n; i <= startEnd; i++) { wallTiles.SetTile(startPosition + new Vector3Int(i, -2, 0), walls[1]); wallTiles.SetTile(startPosition + new Vector3Int(i, -1, 0), walls[1]); wallTiles.SetTile(startPosition + new Vector3Int(i, 0, 0), walls[0]); wallTiles.SetTile(startPosition + new Vector3Int(i, 1, 0), walls[0]); wallTiles.SetTile(startPosition + new Vector3Int(i, 2, 0), walls[0]); groundTiles.SetTile(startPosition + new Vector3Int(i, 0, 0), grounds[0]); if (i == -3) { levelInteractives.levelLimiterLeft = wallTiles.GetCellCenterWorld(startPosition + new Vector3Int(i, 0, 0)); } if (i == -2) { levelInteractives.exitPortalStart = wallTiles.GetCellCenterWorld(startPosition + new Vector3Int(i, 0, 0)); } if (i == 0) { levelInteractives.contactMePortalStart = wallTiles.GetCellCenterWorld(startPosition + new Vector3Int(i, 0, 0)); } if (i == 1) { levelInteractives.playerSpawnPos = wallTiles.GetCellCenterWorld(startPosition + new Vector3Int(i, 0, 0)); } if (i == startEnd) { endPos = startPosition + new Vector3Int(i, 0, 0); } } interPositions = levelInteractives; return(endPos); }
public void SetMinimapLimiters(LevelInteractivesPositions levelInteractives) { minimapStart = levelInteractives.levelLimiterLeft; minimapEnd = levelInteractives.levelLimiterRight; }