Clouds.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
	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;
		}

	}
}

Usage Example

Ejemplo n.º 1
0
        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);
        }
All Usage Examples Of Clouds::Update