今天在写项目的时候写了一个界面UI闪动效果,现在分享给大家,直接挂在UI上就能用,代码如下
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIPalpating : MonoBehaviour
{
/// <summary>
/// 物体的Image组件
/// </summary>
Image UIImage = null;
/// <summary>
/// 当前颜色
/// </summary>
Color UIColor = new Color(1, 1, 1, 1);
/// <summary>
/// 保存原有状态
/// </summary>