title: How do I call this IEnumerator in unity c#
body: <p>So I am trying to Increment my total resources every 3 seconds by my PTick variables I tried using it via an IEnumerator and calling it inside the the start method but it only runs once so I tried it in the update and it runs as quickly as it can. is there any way I can get it just to run every 3 seconds. im happy to try alternatives so long as I can get it running every 3 seconds.</p>
  
  <p>this is the script That I'm trying to get working</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class Resources : MonoBehaviour {
  
  private int foodPtick;
  private int PowerPtick;
  private int HappinessPtick;
  private int MoneyPtick;
  private int PopulationPtick;
  
  public int foodTotal;
  public int PowerTotal;
  public int HappinessTotal;
  public int MoneyTotal;
  public int PopulationTotal;
  
  void Start () {
      StartCoroutine(ResourceTickOver(3.0f));
  }
  
  void Update () {
  
  }
  
  IEnumerator ResourceTickOver(float waitTime){
      yield return new WaitForSeconds(waitTime);
      foodTotal += foodPtick;
      PowerTotal += PowerPtick;
      HappinessTotal += HappinessPtick;
      MoneyTotal += MoneyPtick;
      PopulationTotal += PopulationPtick;
      Debug.Log("Resources" + "food" + foodTotal + "power" + PowerTotal + "Happiness" + HappinessTotal + "Money" + MoneyTotal + "Population" + PopulationTotal);
  
  }
  
  public void ChangeResource(int food,int power, int happy, int money,int pop)
  {
      Debug.Log("Old Per Tick" + "food" + foodPtick + "power" + PowerPtick + "Happiness" + HappinessPtick + "Money" + MoneyPtick + "Power" + PopulationPtick);
      foodPtick += food;
      PowerPtick += power;
      HappinessPtick += happy;
      MoneyPtick += money;
      PopulationPtick += pop;
      Debug.Log("New Per Tick" + "food" + foodPtick + "power" + PowerPtick + "Happiness" + HappinessPtick + "Money" + MoneyPtick + "Power" + PopulationPtick);
  }
  </code></pre>