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

change how chest spawns

parent 9bb23bad
No related branches found
No related tags found
1 merge request!79Ruud1
......@@ -235,7 +235,7 @@ namespace Bigsock
}
public static void SetRoomIDZero() {
roomID = 0;
roomID = 1;
}
public static void resetMaps()
......@@ -360,10 +360,11 @@ namespace Bigsock
FloorTilemap[roomNr].transform.position.y + bossRoom.GetUpperBound(1) / 2, 0), Quaternion.identity);
}
*/
//Spawns a chest in the middle of the room
public void spawnChest(int[,] room, int roomNr)
{
Chest.tag = roomNr.ToString();
Chest.SetActive(false);
Chest.tag = "Chest";
Instantiate(Chest, new Vector3(FloorTilemap[roomNr].transform.position.x + room.GetUpperBound(0) / 2,
FloorTilemap[roomNr].transform.position.y + room.GetUpperBound(1) / 2, 0), Quaternion.identity);
}
......
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