void Update()
{
if( StartDelayOn )
{
StartCountdown -= Time.deltaTime;
if( StartCountdown < 0.0f )
{
StartDelayOn = false;
Active = true;
}
}
if( Active )
{
position += Direction * Time.deltaTime * Speed;
CurrentTime += Time.deltaTime;
if( position.y > StopHeight && UseStopHeight )
{
Active = false;
position.y = StopHeight;
}
if( CurrentTime > StopTime && !UseStopHeight )
Active = false;
transform.position = position;
}
}