add getter setter to skybox (#5778)

This commit is contained in:
zheng han
2019-12-05 10:37:51 +08:00
committed by pandamicro
parent e352144972
commit b72b661feb
+11 -2
View File
@@ -267,11 +267,20 @@ cc.PlanarShadowInfo = PlanarShadowInfo;
export class SceneGlobals {
@property({ type: AmbientInfo })
public ambient = new AmbientInfo();
@property({ type: SkyboxInfo })
public skybox = new SkyboxInfo();
@property
private _skybox = new SkyboxInfo();
@property({ type: PlanarShadowInfo })
public planarShadows = new PlanarShadowInfo();
@property({ type: SkyboxInfo })
get skybox() {
return this._skybox;
}
set skybox(value) {
this._skybox = value;
}
set renderScene (rs: RenderScene) {
this.ambient.renderScene = rs;
this.skybox.renderScene = rs;