30 lines
601 B
C#
30 lines
601 B
C#
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|