Commit 369adb9a authored by linzhiguo's avatar linzhiguo

+ 增加个按钮看看

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