public static TutorialComponent getInstance () { if ( myTutorialComponent == null ) { if(Camera.main != null) { myTutorialComponent = GameObject.Find("tutorialUIPanel").GetComponent < TutorialComponent > (); } } return myTutorialComponent; }
private void displayTutorialPart(string prefab, float x, float y, float t1, float t2) { string prefabName = "Prefabs/Tutorial/" + prefab; Object tutorial = Resources.Load <GameObject>(prefabName); Vector3 pos = new Vector3(x, y, 100); GameObject tutorial_go = (GameObject)Object.Instantiate(tutorial, pos, Quaternion.identity); //tutorial_go.transform.parent = canvas_go.transform; tutorial_go.transform.SetParent(canvas_go.transform); TutorialComponent tc = tutorial_go.GetComponent <TutorialComponent>(); tc.prefab = prefab; pendingTimers += 1; tc.setTimer(t1, t2); }
public void OnCourseDeselected() { GeneralComponent.OnDeselectCourseOperation(); PracticalComponent.OnDeselectCourseOperation(); TutorialComponent.OnDeselectCourseOperation(); }