1234567891011121314151617181920 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class AlphaAnim : MonoBehaviour
- {
- private RawImage sprite;
- void Start ()
- {
- sprite = GetComponent<RawImage>();
- }
-
- // Update is called once per frame
- void Update () {
- sprite.color = new Color(sprite.color.r, sprite.color.g, sprite.color.b, Mathf.PingPong(Time.time, 1f));
- }
- }
|