ZoeAppClass/Assets/Scripts/Menu/Menu_Item.cs

21 lines
474 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Menu_Item : MonoBehaviour
{
public RectTransform rect;
private void FixedUpdate()
{
transform.Translate(Vector2.up * .25f, Space.World);
}
// Update is called once per frame
void Update()
{
if (rect.anchoredPosition.y >= 225)
{
rect.anchoredPosition = new Vector2(rect.anchoredPosition.x, -225);
}
}
}