void StartStage() { instructionsPanel = GUIManager.Instance.InstructionsPanel; SM = GetComponent <StageManager2>(); StartGeneration(); //GUIManager.Instance.StageSelector.gameObject.SetActive(true); }
// float heightOfLevel; public void StartScript() { //Fetch the Collider from the GameObject // Collider m_Collider = parent.GetComponent<Collider>(); //Fetch the minimum and maximum bounds of the Collider volume StageManager2 parent = transform.parent.GetComponent <StageManager2>(); m_Min = parent.b_Min; m_Max = parent.b_Max; int levels = parent.levels; float heightOfLevel = parent.heightOfLevel; // float y_min = m_Min.y; // float y_max = m_Max.y; for (float i = 1; i <= levels; i++) { createFloor(-i * heightOfLevel); } // createFloor(7.3f); // float start_x = m_Min.z; // float start_z = m_Max.x + 1; // for (float i = start_x; i < m_Max.x; i++){ // Vector3 position = new Vector3(start_x, m_Min.y, start_z); // Debug.Log(position); // GameObject cube = Instantiate(sidePrefab, position, Quaternion.identity); // cube.transform.parent = gameObject.transform; // } //Output this data into the console }
private void Start() { m_StartWait = new WaitForSeconds(m_StartDelay); m_EndWait = new WaitForSeconds(m_EndDelay); m_Paused = false; m_ItemSpawner = GameObject.Find("ItemManager").GetComponent <ItemSpawner>(); m_StageManager = GameObject.Find("Stage").GetComponent <StageManager2>(); PlayLobbyMusic(); }