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