mirror of
https://github.com/OMGeeky/GameDevGameJamV2.git
synced 2026-01-18 17:30:12 +01:00
16 lines
341 B
C#
16 lines
341 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DissolveSphere : MonoBehaviour {
|
|
|
|
Material mat;
|
|
|
|
private void Start() {
|
|
mat = GetComponent<Renderer>().material;
|
|
}
|
|
|
|
private void Update() {
|
|
mat.SetFloat("_DissolveAmount", Mathf.Sin(Time.time) / 2 + 0.5f);
|
|
}
|
|
} |