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

fixed spawn area

parent 83d847e9
No related branches found
No related tags found
2 merge requests!52Updating master,!49Ruud1
......@@ -226,8 +226,8 @@ namespace Bigsock
for (int i = 0; i < enemies; i++)
{
int enemyRandom = Random.Range(0, Enemy.Length);
int randomLocation_x = Random.Range(0, map.GetUpperBound(0));
int randomLocation_y = Random.Range(0, map.GetUpperBound(1));
int randomLocation_x = Random.Range(1, map.GetUpperBound(0) - 1);
int randomLocation_y = Random.Range(1, map.GetUpperBound(1) - 1);
Instantiate(Enemy[enemyRandom], new Vector3Int((int)FloorTilemap[roomNr].transform.position.x + randomLocation_x,
(int)FloorTilemap[roomNr].transform.position.y + randomLocation_y, 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