123456789101112131415161718192021222324252627 |
- // NiuZhiYing
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class XiaoRongEffect : MonoBehaviour {
- Material mat;
- public float range = 1.0f;
- // Use this for initialization
- void Start () {
- mat = this.GetComponent<Image>().material;
- }
- // Update is called once per frame
- void Update () {
- if (mat) {
- mat.SetFloat("_range", range);
- }
- }
- void OnEnable()
- {
- this.range = 1.0f;
- }
- }
|