您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

28 行
536 B

using UnityEngine;
namespace UIWidgetsSample.RaycastableScene
{
public class LightController : MonoBehaviour
{
public Light light;
static Light lightInstance;
void OnEnable()
{
lightInstance = light;
}
public static void SwitchLight(bool state)
{
lightInstance.enabled = state;
}
public static void ChangeLightColor(float color)
{
lightInstance.color = Color.HSVToRGB(color, 0.3f, 0.9f);
}
}
}