Commit 06c6db3f authored by Tt's avatar Tt

1

parent 73940a53
......@@ -106,8 +106,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.visibleVegetableList();
// 开始第一题(中间初始化)
this.initLayoutMain();
pg.audio.playAudioByUrl(this.data.auidoStart).then(() => {
// 初始化引导
this.initGuide();
})
}
static successPosArray: Array<cc.Vec2> = [cc.v2(50, -30), cc.v2(50, 0)];
private successArr: Array<cc.Node>;
......@@ -231,6 +233,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (this.guide == 0) {
this.guide = 1;
this.showGuide();
pg.audio.playAudioByUrl(this.data.audioVegetable)
}
node.scale = 1.4;
node.x = this.successPos.x;
......@@ -636,10 +639,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initGuide() {
this.guide = 0;
this.showGuide();
}
startGuide() {
//
pg.audio.playAudioByUrl(this.data.audioMeet)
}
showGuide() {
if (this.guide == 0) {
......@@ -728,8 +728,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.find(this, 'layout_xiaodi').getComponent(dg_xiaodi).playOverEnd()
}
private gameOver() {
pg.audio.playAudioByUrl(this.data.auidoEnd).then(() => {
pg.audio.playAudioByUrl(this.data.auidoFinish).then(() => {
// onHomeworkFinish(data)
this.showXiaodi();
})
})
}
onTouchExit() {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
......
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