After stop coroutine it resumes its task when I call start coroutine

When player gets life I want to start my timer coroutine and when player loose life I want to stop timer coroutine. But when player gets an extra life at that time, I want to start again my timer coroutine.

For this task I have written following code.
public void StartPowerUpEnumrator ()
Debug.Log (“start power up…”);
StartCoroutine (powerUpEnumerator);

	public void StopPowerUpEnumrator ()
		Debug.Log ("stop power up....");
		StopCoroutine (powerUpEnumerator);

	IEnumerator GeneratePowerUp ()
		while (true) {
			yield return new WaitForSeconds (60f);

			float horzPos = Random.Range (-5f, 5f);
			float vertPos = Random.Range (-3f, 3f);

			Debug.Log("Instantiate power up..."); 
			int selectedPowerUp = Random.Range (0, powerUpsPref.Length);
			GameObject powerUpObj = Instantiate (powerUpsPref [selectedPowerUp], new Vector3 (horzPos, vertPos, 0f), Quaternion.identity) as GameObject;
			powerUpObj.transform.SetParent (transform);

But when a player gets an extra life and start timer coroutine, it will not wait for 60 seconds to generated power up, it directly call next statements after wait for seconds. I want when I start my timer coroutine it again need to wait for 60 seconds then execute next lines.

My log gives you more idea regarding problem.


Please give me some solution for this.

Coroutine are quite unfriendly in my opinion. You can use my SmartTimersManager package to solve this. Simply add TimersManager.SetTimer(this, 60f, GeneratePowerUp); whenever you want to set/reset the delayed function.