Iterator interface type?

I need a iterator interface type thing, because void doesn’t work.

Error: Screenshot by Lightshot

	void Update () {
		if (Input.GetKeyDown ("escape")) {
			quitHasPerm = false;
			winText.text = "Are you sure you want to quit?";
			yield return new WaitForSeconds (1);
			winText.text = "Are you sure you want to quit? 5";
			yield return new WaitForSeconds (1);
			winText.text = "Are you sure you want to quit? 4";
			yield return new WaitForSeconds (1);
			winText.text = "Are you sure you want to quit? 3";
			yield return new WaitForSeconds (1);
			winText.text = "Are you sure you want to quit? 2";
			yield return new WaitForSeconds (1);
			winText.text = "Are you sure you want to quit? 1";
			yield return new WaitForSeconds (1);
			winText.text = "";
			quitHasPerm = false;
		}
		if(quitHasPerm){
			if(Input.GetKeyDown("escape")){
				Application.Quit ();
			}
		}
	}

Thanks in advance

Don’t use Update, put this code into:

IEnumerator WinBlock(){

    ...

    //your yielded code

    ...

}

and call it as

StartCoroutine(WinBlock());

once you want it to start.