using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MyBackGroundMove : MonoBehaviour
{
    public float startY = 12f;
    public float endY = 12f;
    public float moveSpeed = 0.1f;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(0, -moveSpeed * Time.deltaTime, 0);
        if (transform.position.y <= endY)
        {
            transform.position = new Vector3(0, startY, 0);
        }
    }
}
