In my really simple simon says type game, there is a sequence of colors the player has to match. The only problem is when the computer decides if the player answers correctly, it instantly goes to the next sequence. I would like to have the game wait for a second before going on to the next sequence, but I don’t know how. If anyone knows why, I would appreciate it if you let me know. My script:
public void ColorPressed(int whichButton){
if (activeSequence [inputInSequence] == whichButton) {
if (gameActive) {
Debug.Log ("Correct");
waitBetweenLevels -= Time.deltaTime;
inputInSequence++;
}
if (inputInSequence >= activeSequence.Count) {
if (activeSequence.Count > PlayerPrefs.GetInt ("EasyHighScore")) {
PlayerPrefs.SetInt ("EasyHighScore", activeSequence.Count);
}
scoreText.text = "Score: " + activeSequence.Count + "- High Score: " + PlayerPrefs.GetInt ("EasyHighScore");
posInSequence = 0;
inputInSequence = 0;
colorSelect = Random.Range (0, colors.Length);
activeSequence.Add (colorSelect);
colors [activeSequence [posInSequence]].color = new Color (colors [activeSequence [posInSequence]].color.r, colors [activeSequence [posInSequence]].color.g, colors [activeSequence [posInSequence]].color.b, 1f);
buttonSounds [activeSequence [posInSequence]].Play ();
litCounter = lit;
shouldBeLit = true;
gameActive = false;
correct.Play ();
//Break Here
}