Hello,
I can’t seem to wrap the logic around my head between converting a float to an integer. I have looked at all the other Unity answers and still don’t seem to get it.
It’s this code here that I am having problems with.
Score.GetComponent().score += MainCam.GetComponent().Timer;
Score.GetComponent().score - This is an integer.
MainCam.GetComponent().Timer; - This is a float
IEnumerator PointsTotal()
{
if (CountingPoints == false) {
Score.GetComponent<Score> ().score += ballsLeft;
Score.GetComponent<Score>().score += MainCam.GetComponent<Controls>().Timer;
//Score.GetComponent<Score> ().score += MainCam.GetComponent<Controls>().
yield return new WaitForSeconds (ballsLeft);
CountingPoints = true;
}
}
}