Added boundary walls to obstacle course
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user