Skip to content
Snippets Groups Projects
Commit 3f80e6f4 authored by Robin Ruud Kristensen's avatar Robin Ruud Kristensen
Browse files

added boss room spawn and teleporter to it

parent 66486961
No related branches found
No related tags found
2 merge requests!75Main,!66Ruud1
......@@ -8,20 +8,26 @@ namespace Bigsock
{
[SerializeField]
protected NeigbourSO[] mapParam;
[SerializeField] NeigbourSO BossRoom;
private static List<int[,]> roomList = new List<int[,]>();
public override void RunProceduralGeneration()
{
for (int i = 0; i <= RoomCount - 1; i++)
{
int randomMap = Random.Range(0, mapParam.Length);
int[,] map = tilemapGenerator.GenerateArray(mapParam[randomMap].width, mapParam[randomMap].height, mapParam[randomMap].empty);
roomList.Add(map);
tilemapGenerator.RenderMap(roomList[i],i);
tilemapGenerator.RenderMap(roomList[i],i, false);
tilemapGenerator.SpawnEnemies(map, 4 + i, i);
}
int[,] bossMap = tilemapGenerator.GenerateArray(BossRoom.width, BossRoom.height, BossRoom.empty);
roomList.Add(bossMap);
tilemapGenerator.RenderMap(roomList[roomList.Count - 1],roomList.Count - 1, true);
tilemapGenerator.SpawnBoss(bossMap, roomList.Count - 1);
tilemapGenerator.polyCollider(roomList[0], 0);
}
......@@ -30,5 +36,10 @@ namespace Bigsock
{
return roomList[i];
}
public static int GetRoomListCount()
{
return roomList.Count;
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment