IEnumerator setBaseColor() { yield return(new WaitForSeconds(_errorTime)); _renderer.color = baseColor; _state = PuzzleManager.State.OFF; }
public void changeToFail() { _state = PuzzleManager.State.Error; _renderer.color = errorColor; StartCoroutine(setBaseColor()); ForwardZ = false; ReverseZ = false; speed = 0; }
public void changeToActive() { // shaky shaky shakeDuration = 0.5f; _state = PuzzleManager.State.ON; // currentColor = activeColor; _renderer.color = activeColor; int x = Random.Range(0, 3); if (x == 0) { ReverseZ = true; } else { ForwardZ = true; } speed = Random.Range(10, 15); }