Commit 0008a5ef authored by liujiangnan's avatar liujiangnan

feat

parent 5350079d
...@@ -66,11 +66,11 @@ export default class NewClass extends middleLayerBase { ...@@ -66,11 +66,11 @@ export default class NewClass extends middleLayerBase {
} }
setVideoToBottom() { setVideoToBottom() {
const video = cc.find("Canvas").getComponentInChildren(cc.VideoPlayer); const videos = cc.find("Canvas").getComponentsInChildren(cc.VideoPlayer);
if (video) { for (let i = 0; i < videos.length; i++) {
const video = videos[i];
cc.find("Canvas/Main Camera").getComponent(cc.Camera).backgroundColor = cc.color(0,0,0,0); cc.find("Canvas/Main Camera").getComponent(cc.Camera).backgroundColor = cc.color(0,0,0,0);
video.stayOnBottom = true; video.stayOnBottom = true;
} else {
} }
} }
...@@ -897,6 +897,7 @@ export default class NewClass extends middleLayerBase { ...@@ -897,6 +897,7 @@ export default class NewClass extends middleLayerBase {
this.loadOnlineBundle('NJ_YouLeChang'); this.loadOnlineBundle('NJ_YouLeChang');
} }
this.initListener(); this.initListener();
global.middleLayer = cc.find('middleLayer').getComponent('middleLayer');
} }
......
declare const global:any = {};
/** !#en /** !#en
The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace. The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace.
!#zh !#zh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment