[]layabox 只支持一个灯光?
//加载上料闪光
private addLoadCCDLight() {
//聚光灯
this.loadCCDlight = this.scene.addChild(new Laya.SpotLight()) as Laya.SpotLight;
this.loadCCDlight.color = new Laya.Vector3(1, 1, 1);
this.loadCCDlight.transform.position = new Laya.Vector3(-1, 1.2, 0.0);
this.loadCCDlight.direction = new Laya.Vector3(0.15, -1.0, 0.0);
this.loadCCDlight.attenuation = new Laya.Vector3(0.0, 0.0, 0.8);
this.loadCCDlight.range = 6.0;
this.loadCCDlight.spot = 32;
this.loadCCDlight.intensity = 100;
}
//加载检测闪光
private addCheckCCDLight() {
//聚光灯
this.checkCCDligt = this.scene.addChild(new Laya.SpotLight()) as Laya.SpotLight;
this.checkCCDligt.color = new Laya.Vector3(1, 1, 1);
this.checkCCDligt.transform.position = new Laya.Vector3(1.0, 1.2, 0.0);
this.checkCCDligt.direction = new Laya.Vector3(0.15, -1.0, 0.0);
this.checkCCDligt.attenuation = new Laya.Vector3(0.0, 0.0, 0.8);
this.checkCCDligt.range = 6.0;
this.checkCCDligt.spot = 32;
this.checkCCDligt.intensity = 100;
}
我明明加载2个聚光灯.但是只显示一个呢?
private addLoadCCDLight() {
//聚光灯
this.loadCCDlight = this.scene.addChild(new Laya.SpotLight()) as Laya.SpotLight;
this.loadCCDlight.color = new Laya.Vector3(1, 1, 1);
this.loadCCDlight.transform.position = new Laya.Vector3(-1, 1.2, 0.0);
this.loadCCDlight.direction = new Laya.Vector3(0.15, -1.0, 0.0);
this.loadCCDlight.attenuation = new Laya.Vector3(0.0, 0.0, 0.8);
this.loadCCDlight.range = 6.0;
this.loadCCDlight.spot = 32;
this.loadCCDlight.intensity = 100;
}
//加载检测闪光
private addCheckCCDLight() {
//聚光灯
this.checkCCDligt = this.scene.addChild(new Laya.SpotLight()) as Laya.SpotLight;
this.checkCCDligt.color = new Laya.Vector3(1, 1, 1);
this.checkCCDligt.transform.position = new Laya.Vector3(1.0, 1.2, 0.0);
this.checkCCDligt.direction = new Laya.Vector3(0.15, -1.0, 0.0);
this.checkCCDligt.attenuation = new Laya.Vector3(0.0, 0.0, 0.8);
this.checkCCDligt.range = 6.0;
this.checkCCDligt.spot = 32;
this.checkCCDligt.intensity = 100;
}
我明明加载2个聚光灯.但是只显示一个呢?
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
w1114367261
赞同来自: