hra vertical bird
This commit is contained in:
17
Assets/Scripts/VerticalBird/PohybPozadi.cs
Normal file
17
Assets/Scripts/VerticalBird/PohybPozadi.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user