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