I want to give a Player an Increment in Pints about 5 points every 5 secounds but the function just wait 5 seconds and then start adding Points every frame I need some solution Please, and thanks by advanced
void Update()
{
StartCoroutine("AddPoints");
}
void Points()
{
this.gameObject.GetComponent<MAIN>().Points += 5;
}
IEnumerator AddPoints()
{
yield return new WaitForSeconds(5f);
Points();
}