Files
ZHGD_Web/Assets/Scripts/UI/Other/WaveImage.cs

30 lines
601 B
C#
Raw Normal View History

2025-07-13 23:16:20 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WaveImage : MonoBehaviour
{
[SerializeField]
private float realTime = 3;
private float judgeTime = 3;
// Start is called before the first frame update
void Start()
{
judgeTime = Time.time;
}
// Update is called once per frame
void Update()
{
float t = Time.time - judgeTime;
if(t >= realTime)
{
Transform tg = transform.GetChild(0);
tg.SetAsLastSibling();
judgeTime = Time.time;
}
}
}