Exemplo n.º 1
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance           = this;
         distractions       = FindObjectsOfType(typeof(Distraction)) as Distraction[];
         subject            = FindObjectOfType <SubjectDataHolder>();
         salienceController = FindObjectOfType <SalienceController>();
     }
 }