I have an object moving accross the screen and ever 30 seconds i want the object to stop moving moving for 2-3 seconds and then start moving again. I have been trying to find a way to compare the time spacing i want with the actual time elapsed. But im coming up blank. I was using
the code
if(30 == Time.time)
{
Object stop moving;
}
//thats only sudo code.
but that that dosent work becuase Time.time is read only. So i want to know if there is another command that i am missing that i can use to compare the time spacing i want with the actual amount of since the game started. or am i just going about this totally the wrong way.