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.
35 lines
740 B
35 lines
740 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace UltraCombos.Frozen
|
|
{
|
|
public class GiantSnowflake : MonoBehaviour
|
|
{
|
|
Material material;
|
|
float alpha = 0.0f;
|
|
float smooth = 0.025f;
|
|
|
|
private void Start()
|
|
{
|
|
material = GetComponent<MeshRenderer>().material;
|
|
}
|
|
|
|
private void FixedUpdate()
|
|
{
|
|
if (SceneController.Instance.rate < 0.5f)
|
|
{
|
|
alpha = Mathf.Lerp(alpha, 1.0f, smooth);
|
|
}
|
|
else
|
|
{
|
|
alpha = Mathf.Lerp(alpha, 0.0f, smooth);
|
|
}
|
|
|
|
material.color = new Color(1.0f, 1.0f, 1.0f, alpha);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|