public void PressPowerButton() { if (grid != null) { if (grid.State != UnityGrid.GridStates.Unsolved) { grid.Reset(); } else { grid.RunEvaluation(); } } }
// Update is called once per frame void Update() { if (grid != null) { if (grid.State == UnityGrid.GridStates.Unsolved) { currentTime -= 1 * Time.deltaTime; CountdownText.text = currentTime.ToString("00.00"); if (currentTime <= 0) { currentTime = 0; grid.RunEvaluation(); } } else { CountdownText.text = "----"; } } }