2 using System.Collections;
7 public string patientFolderName;
9 public GameObject sphere;
10 public GameObject sphereEmitters;
11 public GameObject patientSelector;
16 PatientEventSystem.startListening (
17 PatientEventSystem.Event.PATIENT_NewPatientDirectoryFound,
21 PatientEventSystem.startListening (
22 PatientEventSystem.Event.PATIENT_FinishedLoading,
27 PatientDirectoryLoader.setPath(
"../Patients/");
30 sphere.SetActive (
true);
31 sphereEmitters.SetActive (
true);
34 sphereEmitters.GetComponent<Animator> ().Play (
"EnableSphereEmitters", -1, 1f);
35 sphere.GetComponent<Animator> ().Play (
"EnableSphere", -1, 1f);
38 void addPatientEntry(
object obj = null )
41 for (
int index = 0; index < PatientDirectoryLoader.getCount (); index++) {
42 PatientMeta patient = PatientDirectoryLoader.getEntry(index);
43 string folderName = Path.GetFileName (patient.path);
44 if (folderName == patientFolderName) {
45 Debug.Log (
"Found patient " + patientFolderName);
46 PatientDirectoryLoader.loadPatient(index);
53 Debug.LogWarning (
"Patient '" + patientFolderName +
"' not found! Make sure to enter valid Patient folder in 'Patient Folder Name'!");
54 patientSelector.SetActive (
true);
58 void loadedPatient(
object obj = null )
60 if( toolToLoad != null )
61 ToolControl.instance.chooseTool (toolToLoad);