18 lines
370 B
C#
18 lines
370 B
C#
using UnityEngine;
|
|
|
|
public class PohybPozadi : MonoBehaviour
|
|
{
|
|
public float speed = 200f; // vyšší hodnoty, UI používá pixely
|
|
private RectTransform rectTransform;
|
|
|
|
void Start()
|
|
{
|
|
rectTransform = GetComponent<RectTransform>();
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
rectTransform.anchoredPosition += Vector2.down * speed * Time.deltaTime;
|
|
}
|
|
}
|