Esempio n. 1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
 void Start()
 {
     btn.onClick.AddListener(IsClicked);
     wms = windowManager.GetComponent <WindowManagerScript>();
 }
Esempio n. 3
0
 // Finds windowManagerScript, finds alarmSound, sets itself to active (default state).
 void Awake()
 {
     windowManagerScript = FindObjectOfType <WindowManagerScript>();
     alarmSound          = GameObject.FindGameObjectWithTag("sound");
     active = true;
 }