Implemented all needed to get a portal working to floor level as well as setting up portals for future game modes

This commit is contained in:
Gregory Campbell
2020-01-11 15:55:01 -05:00
parent 2b6eb87127
commit 31b81f08b9
7 changed files with 1605 additions and 12 deletions
+9 -4
View File
@@ -8,13 +8,18 @@ using UnityEngine.SceneManagement;
public class FloorLevel : MonoBehaviour
{
public int escalation;
public int escalation = 1;
public GameObject player;
public PlayerController script;
public GameObject[] obstacleList;
private int selection = 0;
void Awake()
{
script.respawnTime = Time.time;
}
// Start is called before the first frame update
void Start()
{
@@ -82,13 +87,13 @@ public class FloorLevel : MonoBehaviour
Instantiate(obstacleList[selection], new Vector3(50*i, 2, 50*j), Quaternion.identity);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-50*i, 3, -50*j), Quaternion.identity);
Instantiate(obstacleList[selection], new Vector3(-50*i, 2, -50*j), Quaternion.identity);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(-50*i, 4, 50*j), Quaternion.identity);
Instantiate(obstacleList[selection], new Vector3(-50*i, 2, 50*j), Quaternion.identity);
selection = Random.Range(2, obstacleList.Length);
Instantiate(obstacleList[selection], new Vector3(50*i, 5, -50*j), Quaternion.identity);
Instantiate(obstacleList[selection], new Vector3(50*i, 2, -50*j), Quaternion.identity);
script.transform.position = new Vector3((50*escalation)+100, 2, (50*escalation)+100);
script.transform.Rotate(0.0f, 0.0f, 0.0f, Space.Self);