void Update () { transform.position += Vector3.right * speed; timeLeft -= Time.deltaTime; if ( timeLeft < 0 ) { animationOver = true; timeLeft = newTime; } if(animationOver == true){ transform.position = startPosition; animationOver = false; } } }
public void Update(GameTime gameTime) { Time.Update(gameTime); ambientalLightShader.Update(Time.Value); sky.Update(Time); stars.Update(Time); moon.Update(Time); sun.Update(Time); clouds.Update(Lights); }