Commit 79b6031b authored by Tt's avatar Tt

bug修复

parent b6f5771f
...@@ -1946,8 +1946,8 @@ ...@@ -1946,8 +1946,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-204.725, 0,
-30.240000000000002, 0,
0, 0,
0, 0,
0, 0,
...@@ -1970,7 +1970,7 @@ ...@@ -1970,7 +1970,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "fbzRyXxD9OwLKO+6qWtnY4" "_id": "90JZlywChCposyxZ7n2a5O"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2003,7 +2003,7 @@ ...@@ -2003,7 +2003,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "06/oZ5Kc5BbqL0/dGm17Wl" "_id": "4etNMpn5pDsZzUA7ILmMeI"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2042,8 +2042,8 @@ ...@@ -2042,8 +2042,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
127.33500000000001, 0,
-30.240000000000002, 0,
0, 0,
0, 0,
0, 0,
...@@ -2066,7 +2066,7 @@ ...@@ -2066,7 +2066,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "90vW9AJoNFhILPqxz4k/b+" "_id": "22TvLZX1lFRY/4vJ8An4VP"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2099,7 +2099,7 @@ ...@@ -2099,7 +2099,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "84LXwoWyRIy5Xxj1UW3qiZ" "_id": "abqm6vPjtAxqmOI2/Z9fLN"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -2646,8 +2646,8 @@ ...@@ -2646,8 +2646,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-204.725, 0,
-6.239999999999995, 0,
0, 0,
0, 0,
0, 0,
...@@ -2670,7 +2670,7 @@ ...@@ -2670,7 +2670,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "6fLe5dJr5LWLu6y7uYkOtY" "_id": "7eLLgVzz9Nq5PHAuIHgT7X"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2703,7 +2703,7 @@ ...@@ -2703,7 +2703,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "494WYP6clOeacseQqfFlKm" "_id": "47HAjgHgRLtYcfG5F8SBKK"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2742,8 +2742,8 @@ ...@@ -2742,8 +2742,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
127.33500000000001, 0,
-6.239999999999995, 0,
0, 0,
0, 0,
0, 0,
...@@ -2766,7 +2766,7 @@ ...@@ -2766,7 +2766,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "fajdqkN/9I7Lr3ZR1tcmZ6" "_id": "85QoeuAkdKHKWHLfLLgFZR"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2799,7 +2799,7 @@ ...@@ -2799,7 +2799,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "3cFSU1eX9P/ojUUXJsQXjY" "_id": "08lHCwDjJIvZ4kTfmWxKmP"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2838,8 +2838,8 @@ ...@@ -2838,8 +2838,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-204.725, 0,
-54.239999999999995, 0,
0, 0,
0, 0,
0, 0,
...@@ -2862,7 +2862,7 @@ ...@@ -2862,7 +2862,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "dcVvq/8WJBsrll74ls+XH3" "_id": "89fOnbB+1A+LJI8L+A+RME"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2895,7 +2895,7 @@ ...@@ -2895,7 +2895,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "dexZo3OtBEiI719yPt6YEn" "_id": "769NGSnXlDGJ6dmoJVeoOo"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2934,8 +2934,8 @@ ...@@ -2934,8 +2934,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
127.33500000000001, 0,
-54.239999999999995, 0,
0, 0,
0, 0,
0, 0,
...@@ -2958,7 +2958,7 @@ ...@@ -2958,7 +2958,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "192Ddvt8RCAJ3L4XcwG1xC" "_id": "62J3svD05D45mkJx8emPTD"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2991,7 +2991,7 @@ ...@@ -2991,7 +2991,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "9fxA6pNK9KDKP8OPzfwVOG" "_id": "e38pP21PpM0b+VeOf6lJs6"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -3970,8 +3970,8 @@ ...@@ -3970,8 +3970,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-263.44, 0,
-7.019999999999996, 0,
0, 0,
0, 0,
0, 0,
...@@ -3994,7 +3994,7 @@ ...@@ -3994,7 +3994,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "87hdH/W59JNJmW2BDgCyPz" "_id": "7aB/MmQSlDzpAbSkAsKr+x"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -4027,7 +4027,7 @@ ...@@ -4027,7 +4027,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "2dsP3ifcZJG6pU4ESnokDO" "_id": "42ZJ4RY3tFd6/b/YTm2JuD"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -4066,8 +4066,8 @@ ...@@ -4066,8 +4066,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
68.62, 0,
-7.019999999999996, 0,
0, 0,
0, 0,
0, 0,
...@@ -4090,7 +4090,7 @@ ...@@ -4090,7 +4090,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "e7DkeTIp5DaZwy6kyQ1eM7" "_id": "f02x1MgThNu4OcgwZeGkeO"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -4123,7 +4123,7 @@ ...@@ -4123,7 +4123,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "b9PIrbBeBLtb9PY0xTF+dl" "_id": "75Eg6TEU1CtrHfrbJVbi18"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -4162,8 +4162,8 @@ ...@@ -4162,8 +4162,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
146.01, 0,
-7.019999999999996, 0,
0, 0,
0, 0,
0, 0,
...@@ -4186,7 +4186,7 @@ ...@@ -4186,7 +4186,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "f3RzN75tVJ3aEnKe1iZHcU" "_id": "cfsTrap9BD3q+GZVapnz2b"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -4219,7 +4219,7 @@ ...@@ -4219,7 +4219,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "03cHa3vwNJPqpxg1lILPIV" "_id": "06v0xAcsxN2odFfZpl7A1M"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -4258,8 +4258,8 @@ ...@@ -4258,8 +4258,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-146.015, 0,
-61.019999999999996, 0,
0, 0,
0, 0,
0, 0,
...@@ -4282,7 +4282,7 @@ ...@@ -4282,7 +4282,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "c2EXPzH8NOLa9RS9c3nw62" "_id": "04EpHN159Fkogzy1jMYUR2"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -4315,7 +4315,7 @@ ...@@ -4315,7 +4315,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "28D8ELJfxPSpVXgKkQNWS/" "_id": "8434UCjuZNJIRTynRxZ0oU"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -4354,8 +4354,8 @@ ...@@ -4354,8 +4354,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
68.625, 0,
-61.019999999999996, 0,
0, 0,
0, 0,
0, 0,
...@@ -4378,7 +4378,7 @@ ...@@ -4378,7 +4378,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "d8ac+vZOFPubMJrc1F01pU" "_id": "80vw/tAOFBJ7udg4odb+cu"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -4411,7 +4411,7 @@ ...@@ -4411,7 +4411,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "ebVKniHQ9N4bKN9LZsLM6R" "_id": "6b+LWppztHIq5tNI9bALzR"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -5877,7 +5877,7 @@ ...@@ -5877,7 +5877,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
823.5, 823.5,
-16.021, 70.615,
0, 0,
0, 0,
0, 0,
...@@ -5903,7 +5903,7 @@ ...@@ -5903,7 +5903,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "text", "_name": "txt",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 117 "__id__": 117
......
...@@ -38,7 +38,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -38,7 +38,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
current: number; current: number;
initData() { initData() {
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this._cantouch = true; this._cantouch = false;
this.current = 0; this.current = 0;
this.successArr = []; this.successArr = [];
this.questions = this.data.questions.map((question, id) => { this.questions = this.data.questions.map((question, id) => {
...@@ -184,6 +184,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -184,6 +184,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
meetCurrentTouchNode: cc.Node; meetCurrentTouchNode: cc.Node;
onTouchMeetStart(event) { onTouchMeetStart(event) {
if (!this._cantouch) return;
this.playLocalAudio('dragdown') this.playLocalAudio('dragdown')
this.waitTime = 8; this.waitTime = 8;
if (this.guide == 1) return; if (this.guide == 1) return;
...@@ -195,6 +196,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -195,6 +196,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.cPos = cc.v2(node); node.cPos = cc.v2(node);
} }
onTouchMeetMove(event) { onTouchMeetMove(event) {
if (!this._cantouch) return;
this.waitTime = 8; this.waitTime = 8;
if (this.guide == 1) return; if (this.guide == 1) return;
// 移动 // 移动
...@@ -210,6 +212,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -210,6 +212,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.y += pos.y; node.y += pos.y;
} }
onTouchMeetEnd(event) { onTouchMeetEnd(event) {
if (!this._cantouch) return;
this.waitTime = 8; this.waitTime = 8;
if (this.guide == 1) return; if (this.guide == 1) return;
let node = event.target; let node = event.target;
...@@ -257,7 +260,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -257,7 +260,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
//-------------------------------蔬菜区域--------------------------------- //-------------------------------蔬菜区域---------------------------------
static vegetableDefaultPos: cc.Vec2 = cc.v2(660, 294); static vegetableDefaultPos: cc.Vec2 = cc.v2(660, 294);
static vegetableAngle: number = 30; static vegetableAngle: number = 20;
private vegetableNodes: Array<cc.Node>; private vegetableNodes: Array<cc.Node>;
initLayoutVegetable() { initLayoutVegetable() {
// 计算肉饼总数量 // 计算肉饼总数量
...@@ -275,7 +278,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -275,7 +278,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.x = SceneComponent.vegetableDefaultPos.x node.x = SceneComponent.vegetableDefaultPos.x
node.y = SceneComponent.vegetableDefaultPos.y node.y = SceneComponent.vegetableDefaultPos.y
// 设定旋转 // 设定旋转
node.angle = this.getVegetableAngleByI(i) pg.view.find(node, 'bg_vegetables').angle = this.getVegetableAngleByI(i)
// 放入数组中便于引用 // 放入数组中便于引用
this.vegetableNodes.push(node); this.vegetableNodes.push(node);
return node; return node;
...@@ -323,6 +326,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -323,6 +326,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
vegetableCurrentTouchNode: cc.Node; vegetableCurrentTouchNode: cc.Node;
onTouchVegetableStart(event) { onTouchVegetableStart(event) {
if (!this._cantouch) return;
this.playLocalAudio('dragdown') this.playLocalAudio('dragdown')
this.waitTime = 8; this.waitTime = 8;
if (this.guide == 0) return; if (this.guide == 0) return;
...@@ -334,6 +338,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -334,6 +338,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.cPos = cc.v2(node); node.cPos = cc.v2(node);
} }
onTouchVegetableMove(event) { onTouchVegetableMove(event) {
if (!this._cantouch) return;
this.waitTime = 8; this.waitTime = 8;
if (this.guide == 0) return; if (this.guide == 0) return;
// 移动 // 移动
...@@ -349,6 +354,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -349,6 +354,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.y += pos.y; node.y += pos.y;
} }
onTouchVegetableEnd(event) { onTouchVegetableEnd(event) {
if (!this._cantouch) return;
this.waitTime = 8; this.waitTime = 8;
if (this.guide == 0) return; if (this.guide == 0) return;
let node = event.target; let node = event.target;
...@@ -417,7 +423,14 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -417,7 +423,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.playDBAnimation(ani, 'normal', 1) pg.view.playDBAnimation(ani, 'normal', 1)
node.parent = this.currentMain node.parent = this.currentMain
}).delay(0.9).call(() => { }).delay(0.9).call(() => {
if (this.guide == 2) {
this.guide = 3
pg.audio.playAudioByUrl(this.data.auidoFinish).then(() => {
this.nextStage();
})
} else {
this.nextStage(); this.nextStage();
}
}) })
.start(); .start();
}, 0.2) }, 0.2)
...@@ -551,7 +564,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -551,7 +564,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 先把当前的还原 // 先把当前的还原
this.resetCurrent(); this.resetCurrent();
// 两边放入 // 两边放入
this.createCurrent(); this.createLast();
// 中间移出 // 中间移出
cc.tween(this.currentMain).by(1, { y: -1800 }).start(); cc.tween(this.currentMain).by(1, { y: -1800 }).start();
this.playLocalAudio('nextgame') this.playLocalAudio('nextgame')
...@@ -580,19 +593,19 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -580,19 +593,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
let lastId = this.current; let lastId = this.current;
let questionId = this.questions.length - 1 - lastId; let questionId = this.questions.length - 1 - lastId;
if (!this.meetCurrentNode) { if (!this.meetCurrentNode) {
let meet = this.createMeet(this.preQuestion, questionId) let meet = this.createMeet(this.currentQuestion, questionId)
// let tPosMeet = cc.v2(meet); // let tPosMeet = cc.v2(meet);
// meet.y += 1000 // meet.y += 1000
// cc.tween(meet).to(1, { x: tPosMeet.x, y: tPosMeet.y - 30 }).to(0.1, { y: tPosMeet.y }).start() // cc.tween(meet).to(1, { x: tPosMeet.x, y: tPosMeet.y - 30 }).to(0.1, { y: tPosMeet.y }).start()
} }
if (!this.vegetableCurrentNode) { if (!this.vegetableCurrentNode) {
let vegetable = this.createVegetable(this.preQuestion, questionId) let vegetable = this.createVegetable(this.currentQuestion, questionId)
// let tPosVegetable = cc.v2(vegetable); // let tPosVegetable = cc.v2(vegetable);
// vegetable.y += 1000 // vegetable.y += 1000
// cc.tween(vegetable).to(1, { x: tPosVegetable.x, y: tPosVegetable.y - 30 }).to(0.1, { y: tPosVegetable.y }).start() // cc.tween(vegetable).to(1, { x: tPosVegetable.x, y: tPosVegetable.y - 30 }).to(0.1, { y: tPosVegetable.y }).start()
} }
} }
createCurrent() { createLast() {
// 创建两侧内容 // 创建两侧内容
let lastId = this.current - 1; let lastId = this.current - 1;
let questionId = this.questions.length - 1 - lastId; let questionId = this.questions.length - 1 - lastId;
...@@ -628,6 +641,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -628,6 +641,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 往前翻,向下移动上面下来一个新的内容。 天上掉落内容。 // 往前翻,向下移动上面下来一个新的内容。 天上掉落内容。
onTouchLast() { onTouchLast() {
if (this.guide < 2) return; if (this.guide < 2) return;
if (this.gameEnd) {
this.gameEnd = false;
// 干掉小迪
this.hideXiaodi();
}
// //
this.lastStage(); this.lastStage();
} }
...@@ -640,6 +658,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -640,6 +658,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.guide = 0; this.guide = 0;
this.showGuide(); this.showGuide();
pg.audio.playAudioByUrl(this.data.audioMeet) pg.audio.playAudioByUrl(this.data.audioMeet)
this.scheduleOnce(() => {
this._cantouch = true;
}, 0.5)
} }
showGuide() { showGuide() {
if (this.guide == 0) { if (this.guide == 0) {
...@@ -700,6 +721,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -700,6 +721,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private waitTime: number; private waitTime: number;
update(dt) { update(dt) {
if (this.gameEnd) return;
if (!this.waitTime) this.waitTime = 8; if (!this.waitTime) this.waitTime = 8;
this.waitTime -= dt; this.waitTime -= dt;
if (this.waitTime < 0) { if (this.waitTime < 0) {
...@@ -727,13 +749,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -727,13 +749,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.view.find(this, 'layout_xiaodi').active = false; pg.view.find(this, 'layout_xiaodi').active = false;
pg.view.find(this, 'layout_xiaodi').getComponent(dg_xiaodi).playOverEnd() pg.view.find(this, 'layout_xiaodi').getComponent(dg_xiaodi).playOverEnd()
} }
private gameEnd: boolean;
private gameOver() { private gameOver() {
pg.audio.playAudioByUrl(this.data.auidoEnd).then(() => { this.gameEnd = true;
pg.audio.playAudioByUrl(this.data.auidoFinish).then(() => { // pg.audio.playAudioByUrl(this.data.auidoEnd).then(() => {
// onHomeworkFinish(data) // onHomeworkFinish(data)
this.showXiaodi(); this.showXiaodi();
}) // })
})
} }
onTouchExit() { onTouchExit() {
const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer'); const middleLayer = cc.find('middleLayer')?.getComponent('middleLayer');
......
export const defaultData = export const defaultData =
{ {
"npcTitle": "", "npcAudioText": "exit",
"npcAudio": "http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3", "npcAudio": "http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3",
"npcAudioEnd": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3", "npcAudioEnd": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3",
......
...@@ -85,8 +85,6 @@ ...@@ -85,8 +85,6 @@
<div style="padding: 10px;background-color: #fff;"> <div style="padding: 10px;background-color: #fff;">
<div class="border-dashed" style="margin: 20px;width: 1300px;"> <div class="border-dashed" style="margin: 20px;width: 1300px;">
<span style="font-size: 20px;">小迪标题: </span>
<input type="text" nz-input [(ngModel)]="item.npcTitle" (blur)="save()">
<span style="font-size: 20px;">小迪开始音频: </span> <span style="font-size: 20px;">小迪开始音频: </span>
<div style="display:flex ;"> <div style="display:flex ;">
<div> <div>
...@@ -98,6 +96,8 @@ ...@@ -98,6 +96,8 @@
<span>{{ item.npcAudioName}}</span> <span>{{ item.npcAudioName}}</span>
</div> </div>
</div> </div>
<span style="font-size: 20px;">小迪结束文字: </span>
<input type="text" nz-input [(ngModel)]="item.npcAudioText" (blur)="save()">
<span style="font-size: 20px;">小迪结束音频: </span> <span style="font-size: 20px;">小迪结束音频: </span>
<div style="display:flex ;"> <div style="display:flex ;">
<div> <div>
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</div> </div>
</div> </div>
<div name="结束音频"> <!-- <div name="结束音频">
<span style="font-size: 20px;">结束音频: </span> <span style="font-size: 20px;">结束音频: </span>
<div style="display:flex ;"> <div style="display:flex ;">
<div> <div>
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<span>{{ item.auidoEndName}}</span> <span>{{ item.auidoEndName}}</span>
</div> </div>
</div> </div>
</div> </div> -->
<div name="肉饼引导音频"> <div name="肉饼引导音频">
......
...@@ -15,7 +15,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -15,7 +15,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
// 储存数据用 // 储存数据用
saveKey = "dg28_drag"; saveKey = "dg28_drag";
item = { item = {
npcTitle: "", npcAudioText: "",
npcAudio: "", npcAudio: "",
npcAudioName: "", npcAudioName: "",
npcAudioEnd: "", npcAudioEnd: "",
......
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