/////////////////
 // Constructor //
 /////////////////
 void Awake()
 {
     if (Smanager != null && Smanager != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         Smanager = this;
     }
 }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     instance = GetComponent <SurpriseManager>(); //required for singleton with instance in scene
 }