Commit 369adb9a authored by linzhiguo's avatar linzhiguo

+ 增加个按钮看看

parent 370cea16
This diff is collapsed.
......@@ -134,14 +134,9 @@ cc.Class({
addPreloadImage() {
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
},
addPreloadAudio() {
this._audioResList.push({ url: this.data.audio_url });
},
addPreloadAnima() {
......@@ -180,23 +175,10 @@ cc.Class({
this.title.string = this.data.title;
let audio_url = this.data.audio_url;
if (window && window.courseware) {
window.courseware.onEvent("course-in-screen", (data, next) => {
// 这里才能执行初始化就开始的东西
if (audio_url && audio_url!=""){
playAudioByUrl(audio_url, ()=>{
this.playGame();
});
}
else{
this.playGame();
}
next();
})
this._start = cc.find('Canvas/start');
this._start.on('click',()=>{
this._start.active = false;
return;
}
else{
if (audio_url && audio_url!=""){
playAudioByUrl(audio_url, ()=>{
this.playGame();
......@@ -205,8 +187,9 @@ cc.Class({
else{
this.playGame();
}
});
}
this.node.on(cc.Node.EventType.TOUCH_START, (event)=>{
if (!this._touched)
......
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