问一个新手问题:怎么实现点击一个按钮,让场景中的灯光渐渐熄灭;现在只能实现瞬间熄灭;varScreenwidth:int;varScreenheight:int;varcount=0;Screenwidth=Screen.width;Screenheigh...问一个新手问题:怎么实现点击一个按钮,让场景中的灯光渐渐熄灭;
现在只能实现瞬间熄灭;
varScreenwidth:int;
varScreenheight:int;
varcount=0;
Screenwidth=Screen.width;
Screenheight=Screen.height;
functionOnGUI(){
GUI.backgroundColor=Color.gray;
if(GUI.Button(Rect(Screenwidth*0.44,Screenheight*0.85,100,30),"进入下一场景"))
{
if(count<1)
{
light.intensity=0;//我是通过操作这个值实现的
count++;
}
}
}
求大神指点
阅读全文
收起全文