Exemplo n.º 1
0
 void PlaySound(BoolMsg msg)
 {
     if (msg.flag)
     {
         GetComponent <AudioSource>().Play();
     }
     else
     {
         GetComponent <AudioSource>().Stop();
     }
 }
Exemplo n.º 2
0
 void SetVisibility(BoolMsg msg)
 {
     GetComponent <MeshRenderer>().enabled = msg.flag;
 }