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.
26 lines
547 B
26 lines
547 B
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
public class LumLightTest : MonoBehaviour { |
|
public GameObject lightObj; |
|
private Color lightColor; |
|
|
|
// Use this for initialization |
|
void Start() |
|
{ |
|
lightColor = new Color(0,0,0,0); |
|
} |
|
|
|
// Update is called once per frame |
|
void Update() |
|
{ |
|
if (lightColor.r < 1) |
|
{ |
|
print(lightColor.r); |
|
lightColor.r += Time.deltaTime; |
|
lightColor.g += Time.deltaTime / 2; |
|
lightObj.GetComponent<Renderer>().material.SetColor("_LuminousColor", lightColor); |
|
} |
|
} |
|
}
|
|
|