using SystemCollections;using SystemCollectionsGeneric;using UnityEngine;public class shouTime MonoBehaviour public UnityEngineUIImage duanLuQi = new UnityEngineUIImage20; public UnityEngineUII
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;
public class shouTime : MonoBehaviour { public Image duanLuQi; public float changeTime = 0.25f; private float timer; private bool isDisplay = true;
void Update()
{
effect();
}
void effect()
{
timer += Time.deltaTime;
if (timer >= changeTime)
{
timer -= changeTime;
if (isDisplay)
{
duanLuQi.color = Color.black;
isDisplay = false;
}
else
{
duanLuQi.color = Color.green;
isDisplay = true;
}
}
}
原文地址: https://www.cveoy.top/t/topic/fiH7 著作权归作者所有。请勿转载和采集!