protected void loadPanel(TutorialManager.STATES st) { if (_panel != null) { GameObject.Destroy(_panel); } GameObject panelTemplate = Resources.Load("Prefabs/Tutorial/" + st.ToString()) as GameObject; _panel = GameObject.Instantiate(panelTemplate); _panel.GetComponent <RectTransform>().SetParent(GameObject.Find("UICanvas").GetComponent <RectTransform>(), false); }
protected void changeToState(TutorialManager.STATES st) { Debug.Log("Tutorial : changeToState " + st.ToString()); _state = st; cleanPanel(); if (st <= endState) { loadPanel(st); } else { endTutorial(); } }