using UnityEngine;

public class Curtain : MonoBehaviour 
{

    public Vector3 Motion;
    public float StartupDelay = 0f;
    private float starttime;

    void Start()
    {
        starttime = Time.time;
    }

	void Update () 
	{
        if (Time.time - starttime < StartupDelay)
            return;

        transform.position += Motion * Time.deltaTime;

        if (transform.position.magnitude > 50f)
            Destroy(gameObject);
	}
}
