Fixed out of bounds error

This commit is contained in:
Gregory Campbell
2020-02-11 21:46:20 -05:00
parent eb85a88643
commit 4023b3fcb7
+2 -2
View File
@@ -247,7 +247,7 @@ public class FloorLevel : MonoBehaviour
if(escalation == 1)
{
selection = Random.Range(0, easyObstacleList.Length);
selection = Random.Range(0, cornerList.Length);
Instantiate(cornerList[selection], new Vector3(100*i+50, Random.Range(-5, 0), -100*j-50), Quaternion.Euler(0, (45*Random.Range(0,8)), 0));
} else {
if(Random.Range(0, 10) != 0)
@@ -280,7 +280,7 @@ public class FloorLevel : MonoBehaviour
if(escalation == 1)
{
selection = Random.Range(0, easyObstacleList.Length);
selection = Random.Range(0, cornerList.Length);
Instantiate(cornerList[selection], new Vector3(-100*i-50, Random.Range(-5, 0), 100*j+50), Quaternion.Euler(0, (45*Random.Range(0,8)), 0));
} else {
if(Random.Range(0, 10) != 0)