void DemoCalled() { start_called = false;//to control the start introduction, never call it again // if (audioSource.isPlaying) audioSource.Stop(); //demo_called = true; PlayAudio(clips[2]); task.ShowDemos(); //task.CreateTask(LEVEL); t_action = gameObject.GetComponent <TeachAction>(); if (t_action != null) { Destroy(t_action); } ease = GameObject.Find("RH_ease_clone"); if (ease != null) { Destroy(ease); } action.ActionTaken(1); //#1 is teachaction which can show a demo //done = t_action.teachactionDone; }
void DemoCalled() { if (!no_demo) { if (demo_called == false) { var outfile = new StreamWriter(dataPath, true); outfile.WriteLine("demo called once at UTC time = " + System.DateTime.UtcNow.ToString()); outfile.Close(); userstart = true; start_called = false;//to control the start introduction, never call it again // if (audioSource.isPlaying) audioSource.Stop(); //demo_called = true; PlayAudio(clips[2]); task.ShowDemos(); //task.CreateTask(LEVEL); t_action = gameObject.GetComponent <TeachAction>(); if (t_action != null) { Destroy(t_action); } ease = GameObject.Find("RH_ease_clone"); if (ease != null) { Destroy(ease); } StartCoroutine(waitDemoAudio(13.0f)); //action.ActionTaken(1); //#1 is teachaction which can show a demo //done = t_action.teachactionDone; //demo_called = true; no_demo = true; } } else { PlayAudio(clips[6]); } }