IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
HideOnPatient.cs
1 using UnityEngine;
2 using System.Collections;
3 
4 public class HideOnPatient : MonoBehaviour {
5 
6  // Use this for initialization
7  void Start () {
8 
9  PatientEventSystem.startListening (PatientEventSystem.Event.PATIENT_StartLoading, show);
10  PatientEventSystem.startListening (PatientEventSystem.Event.PATIENT_Closed, hide);
11  }
12 
13  public void show( object obj = null )
14  {
15  GetComponent<MeshRenderer> ().enabled = false;
16  }
17  public void hide( object obj = null )
18  {
19  GetComponent<MeshRenderer> ().enabled = true;
20  }
21 }