This is my obstacle spawning code:
public GameObject Obstacles;
float gameTime;
void Start()
{
gameTime = Time.timeSinceLevelLoad;
InvokeRepeating("CreateObstacle", 1f, 1.25f);
}
void Update()
{
}
void CreateObstacle()
{
Instantiate(Obstacles);
}
Now what I want to do is InvokeRepeat 1F, 1.25F only when gameTime > 0 && gameTime <= 46.
And InvokeRepeat 0.25f, 0.85f when gameTime > 46.
I have no idea how to do this, beceause if I´d try to make couple if statements they would never update beceause they have to be called in Start() right?
Thanks!