Files
GeoSusGame/Assets/Scripts/VerticalBird/PohybPozadiStop.cs
2026-06-03 11:03:32 +02:00

21 lines
446 B
C#

using UnityEngine;
public class MoveDown : MonoBehaviour
{
public float speed = 200f;
public float stopY = -6315.304f;
private RectTransform rectTransform;
void Start()
{
rectTransform = GetComponent<RectTransform>();
}
void Update()
{
if (rectTransform.anchoredPosition.y >= stopY)
{
rectTransform.anchoredPosition += Vector2.down * speed * Time.deltaTime;
}
}
}