Added boundary walls to obstacle course
This commit is contained in:
@@ -2501,6 +2501,8 @@ MonoBehaviour:
|
|||||||
- {fileID: 5880479941740923922, guid: d8233406c7b546e419c918c028ec65af, type: 3}
|
- {fileID: 5880479941740923922, guid: d8233406c7b546e419c918c028ec65af, type: 3}
|
||||||
- {fileID: 3425233021637308467, guid: 9cfafec4161cf3c4f86a3824513846ac, type: 3}
|
- {fileID: 3425233021637308467, guid: 9cfafec4161cf3c4f86a3824513846ac, type: 3}
|
||||||
- {fileID: 2729766386463878366, guid: 258ef028e1596b043b63e318da3964f2, type: 3}
|
- {fileID: 2729766386463878366, guid: 258ef028e1596b043b63e318da3964f2, type: 3}
|
||||||
|
boundaries: {fileID: 9181995847428758509, guid: cd8f80a3dcff4954598e8b72fd740734,
|
||||||
|
type: 3}
|
||||||
--- !u!4 &1677821150
|
--- !u!4 &1677821150
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class FloorLevel : MonoBehaviour
|
|||||||
public GameObject[] obstacleList;
|
public GameObject[] obstacleList;
|
||||||
public GameObject[] easyObstacleList;
|
public GameObject[] easyObstacleList;
|
||||||
public GameObject[] medObstaclelIst;
|
public GameObject[] medObstaclelIst;
|
||||||
|
public GameObject boundaries;
|
||||||
|
|
||||||
private int selection = 0;
|
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