// Press click on the button. void OnMouseDown() { // If the line is not paused. if (line.isAvailable()) { line.waitTime(); // Paused the line. } else { line.stopRunThread(); // Stop the thread. } }
private void startTime() { if (attend && actualLine != null) { if (actualLine.isAvailable()) { if (time > 0) { time -= timeClock; textTime.GetComponent <TextMesh>().text = "Time: " + time.ToString(); } else { actualLine.deleteElement(gameObject); } } } }