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