public void Awake() { if (Instance != null) { Debug.Log("Game Manager is already in play. Deleting old Instantiating new."); Destroy(gameObject); } else Instance = this; RotObj = Resources.Load("Prefabs/RotJoint", typeof(GameObject)) as GameObject; RampObj = Resources.Load("Prefabs/Ramp", typeof(GameObject)) as GameObject; StepObj = Resources.Load("Prefabs/Steps", typeof(GameObject)) as GameObject; randN = Random.Range(0, 4); objs = new bool[4]; newPosition = setNewPosition(); }
public void Awake() { if (Instance != null) { Debug.Log("Game Manager is already in play. Deleting old Instantiating new."); Destroy(gameObject); } else { Instance = this; } RotObj = Resources.Load("Prefabs/RotJoint", typeof(GameObject)) as GameObject; RampObj = Resources.Load("Prefabs/Ramp", typeof(GameObject)) as GameObject; StepObj = Resources.Load("Prefabs/Steps", typeof(GameObject)) as GameObject; randN = Random.Range(0, 4); objs = new bool[4]; newPosition = setNewPosition(); }