Example #1
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
     }
 }
Example #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>();
     }
 }