private void MyGetPoint() { score++; CoderDestroyableWorkstation.Damage(); if (score == goldLevel) { CoderDestroyableWorkstation.Destroy(); CoderLevelEnder.EndLevel(); } }
void Update() { if (Input.GetKeyDown(KeyCode.T)) { StartStopWatch(); } guiText.text = prefix + Mathf.Max((float)(duration - sw.Elapsed.TotalSeconds), 0).ToString("F2"); if (sw.Elapsed.TotalSeconds > duration && !CoderLevelEnder.LevelEnded) { CoderLevelEnder.EndLevel(); } }
void Awake() { instance = this; }