예제 #1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
예제 #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     Time.timeScale   = 1;
     playerHP         = s_variable.score[1];
     hourglassA.value = playerHP;
     hourglassB.value = playerMaxHP - playerHP;
     hourglassC.value = 0;
     transformC       = hourglassC.GetComponent <Transform>();
     TimeBar          = GetComponent <Image>();
     timeLeft         = maxTime;
 }