Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public class ConfDemo_part3_ranking_masses : MonoBehaviour
private TMP_Text instructions = null;
private Camera mainCamera = null;
private GameObject player = null;
private GameObject menus = null;
private GameObject buttons = null;
private UIManager UIManagerScript = null;

private bool isTask2Answered = false;

private void Start()
{
SceneUIContainer.SetActive(false);
Expand Down Expand Up @@ -57,12 +57,6 @@ IEnumerator StartScene()
GameObject mainCamera = player.transform.Find("Main Camera").gameObject;
GameObject UIContainer = mainCamera.transform.Find("UI Container").gameObject;
GameObject Menu = UIContainer.transform.Find("Menu").gameObject;
GameObject HeaderButtons = Menu.transform.Find("HeaderButtons").gameObject;
// GameObject HeaderButtons = Menu.transform.Find("Buttons").gameObject; //if testing with emulator use this
GameObject menuScreens = Menu.transform.Find("MenuScreens").gameObject;

menus = menuScreens;
buttons = HeaderButtons;

// Get UI Manager UIManagerScript
UIManagerScript = Menu.GetComponent<UIManager>();
Expand All @@ -83,7 +77,10 @@ public IEnumerator RadiiTaskAudio()
{
player.GetComponent<NarrationManager>().PlayClipWithSubtitles("Chapter1Scene2\\7_radius_activity_same_mass_1");
yield return new WaitForSecondsRealtime(13);
player.GetComponent<NarrationManager>().PlayClipWithSubtitles("Chapter1Scene2\\7_radius_activity_same_mass_2");
if (!isTask2Answered)
{
player.GetComponent<NarrationManager>().PlayClipWithSubtitles("Chapter1Scene2\\7_radius_activity_same_mass_2");
}
yield break;
}

Expand All @@ -97,6 +94,7 @@ public void PlayRadiiTask()
public void PlayEndRadiiTaskWrong()
{
// Called in the OnCast() of Task2 UI -> Big, wrong answer try again
isTask2Answered = true;
player.GetComponent<NarrationManager>().PlayClipWithSubtitles("Chapter1Scene2\\6_put_masses_in_order_3");
}

Expand All @@ -120,6 +118,7 @@ public IEnumerator EndRadiiAudio()
public void PlayEndRadiiTask()
{
// Called in the OnCast() of Task2 UI -> Small, Right answer
isTask2Answered = true;
StartCoroutine(EndRadiiAudio());
}
}