You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
472 B
23 lines
472 B
3 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class BurnTest : MonoBehaviour {
|
||
|
public GameObject burnObj;
|
||
|
private float burnData;
|
||
|
|
||
|
// Use this for initialization
|
||
|
void Start () {
|
||
|
burnData = 0.8f;
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update () {
|
||
|
if (burnData > -0.8) {
|
||
|
print(burnData);
|
||
|
burnData -= Time.deltaTime/5;
|
||
|
burnObj.GetComponent<Renderer>().material.SetFloat("_CutOutValue", burnData);
|
||
|
}
|
||
|
}
|
||
|
}
|