123456789101112131415161718192021222324252627282930 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class used_ani : MonoBehaviour
- {
- public GameObject obj;
- private Renderer renderer;
- private float tick;
- private float tick_a;
- private float tick_now;
- void Start()
- {
- tick = -3f;
- tick_a = 0.0001f;
- tick_now = 0;
- }
- void Update()
- {
-
- if (tick <= 3f)
- {
- obj.GetComponent<Renderer>().material.SetFloat("_StartPoint", tick);
- tick_now = tick_now + 1;
- tick = tick + tick_a*tick_now*tick_now/500;
- }
- }
- }
|