From d2d2bddd9557a2964d3d0fb4bc3904c33583bd6f Mon Sep 17 00:00:00 2001 From: Robin Ruud Kristensen <robin1998@hotmail.no> Date: Thu, 27 Oct 2022 22:26:45 +0200 Subject: [PATCH] removed pad variable and from scene --- MrBigsock/Assets/Code/Map/TilemapGenerator.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MrBigsock/Assets/Code/Map/TilemapGenerator.cs b/MrBigsock/Assets/Code/Map/TilemapGenerator.cs index 10b66a9a..1a75d169 100644 --- a/MrBigsock/Assets/Code/Map/TilemapGenerator.cs +++ b/MrBigsock/Assets/Code/Map/TilemapGenerator.cs @@ -13,7 +13,6 @@ namespace Bigsock [SerializeField] TileSetSO tileSetSO; [SerializeField] PolygonCollider2D polygonCollider; [SerializeField] GameObject Door; - [SerializeField] GameObject Pad; [SerializeField] GameObject[] Enemy; private int z_value = 0; private static int i = 0; @@ -138,8 +137,6 @@ namespace Bigsock z_value), Quaternion.identity); DoorLocations.Add(new Vector3Int((int)WallBottom[roomNr].transform.position.x + x + 2, (int)WallBottom[roomNr].transform.position.y, z_value)); - Instantiate(Pad, new Vector3(WallBottom[roomNr].transform.position.x + x + 2, WallBottom[roomNr].transform.position.y, - z_value), Quaternion.identity); FloorTilemap[roomNr].SetTile(new Vector3Int(x + x1 + 1, map.GetLowerBound(1) - 1, z_value), tileSetSO.floorTile[0]); FloorTilemap[roomNr].SetTile(new Vector3Int(x + x1 + 2, map.GetLowerBound(1) - 1, z_value), tileSetSO.floorTile[0]); doorPlaced = true; @@ -220,6 +217,7 @@ namespace Bigsock public void SpawnEnemies(int[,] map, int enemies, int roomNr) { + for (int i = 0; i < enemies; i++) { int randomLocation_x = Random.Range(0,map.GetUpperBound(0)); -- GitLab