Added boundary walls to obstacle course

This commit is contained in:
Gregory Campbell
2020-02-01 18:26:14 -05:00
parent a1b3add28d
commit 6bff24cc23
2 changed files with 27 additions and 0 deletions
+25
View File
@@ -17,6 +17,7 @@ public class FloorLevel : MonoBehaviour
public GameObject[] obstacleList;
public GameObject[] easyObstacleList;
public GameObject[] medObstaclelIst;
public GameObject boundaries;
private int selection = 0;
@@ -282,6 +283,30 @@ public class FloorLevel : MonoBehaviour
}
}
if(i == escalation-1)
{
Instantiate(boundaries, new Vector3(-100*(i+1), 0, 100*j+50), Quaternion.identity);
Instantiate(boundaries, new Vector3(100*(i+1), 0, -100*j-50), Quaternion.identity);
}
if (i == escalation-1 && i != j)
{
Instantiate(boundaries, new Vector3(100*(i+1), 0, 100*j+50), Quaternion.identity);
Instantiate(boundaries, new Vector3(-100*(i+1), 0, -100*j-50), Quaternion.identity);
}
if(j == escalation-1)
{
Instantiate(boundaries, new Vector3(-100*i-50, 0, 100*(j+1)), Quaternion.Euler(0, 90, 0));
Instantiate(boundaries, new Vector3(100*i+50, 0, -100*(j+1)), Quaternion.Euler(0, 90, 0));
}
if(j == escalation-1 && i != j)
{
Instantiate(boundaries, new Vector3(100*i+50, 0, 100*(j+1)), Quaternion.Euler(0, 90, 0));
Instantiate(boundaries, new Vector3(-100*i-50, 0, -100*(j+1)), Quaternion.Euler(0, 90, 0));
}
}
}