2 using System.Collections;
3 using System.Collections.Generic;
7 private List<GameObject> organs =
new List<GameObject>();
12 PatientEventSystem.startListening (PatientEventSystem.Event.PATIENT_FinishedLoading, openPatient);
13 PatientEventSystem.startListening (PatientEventSystem.Event.PATIENT_Closed, closePatient);
18 PatientEventSystem.stopListening (PatientEventSystem.Event.PATIENT_FinishedLoading, openPatient);
19 PatientEventSystem.stopListening (PatientEventSystem.Event.PATIENT_Closed, closePatient);
22 public void addOrgan (GameObject newOrgan) {
23 organs.Add (newOrgan);
26 public void changeOpacityofAll (
float opacity) {
27 foreach(GameObject o
in organs) {
32 public void closePatient(
object obj = null) {
33 organs =
new List<GameObject> ();
36 public void openPatient(
object obj = null) {
37 foreach(Transform child
in transform) {
39 organs.Add (child.gameObject);