Commit b0f35644 authored by wangxin's avatar wangxin

beta 2

parent 49d72965
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 293, "width": 296,
"height": 352 "height": 363
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
125, 130.5,
0, 0,
0, 0,
0, 0,
...@@ -687,11 +687,11 @@ ...@@ -687,11 +687,11 @@
} }
], ],
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "2359cab7-72d3-46cd-bc33-a37eb03a072a" "__uuid__": "1b75f452-5d9f-4913-8c66-2525b5990b1e"
}, },
"_type": 2, "_type": 2,
"_segments": 64, "_segments": 64,
"_N$alphaThreshold": 0.6, "_N$alphaThreshold": 0.5,
"_N$inverted": false, "_N$inverted": false,
"_id": "" "_id": ""
}, },
...@@ -1102,6 +1102,9 @@ ...@@ -1102,6 +1102,9 @@
"_audioTitle": null, "_audioTitle": null,
"_isPlaying": false, "_isPlaying": false,
"_isAnswer": false, "_isAnswer": false,
"_isDone": false,
"_allowClick": true,
"_count": 0,
"_id": "" "_id": ""
}, },
{ {
......
...@@ -432,15 +432,15 @@ ...@@ -432,15 +432,15 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0.959,
-62, -53.467,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
0.87, 0.805,
0.664, 0.615,
1 1
] ]
}, },
...@@ -544,14 +544,14 @@ ...@@ -544,14 +544,14 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
1, 1,
-62, -53.284,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
1, 0.92,
1, 0.92,
1 1
] ]
}, },
......
...@@ -75,31 +75,31 @@ ...@@ -75,31 +75,31 @@
"__id__": 5 "__id__": 5
}, },
{ {
"__id__": 8 "__id__": 7
}, },
{ {
"__id__": 11 "__id__": 10
}, },
{ {
"__id__": 14 "__id__": 13
}, },
{ {
"__id__": 23 "__id__": 22
}, },
{ {
"__id__": 30 "__id__": 29
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 33 "__id__": 32
}, },
{ {
"__id__": 34 "__id__": 33
}, },
{ {
"__id__": 35 "__id__": 34
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -260,9 +260,6 @@ ...@@ -260,9 +260,6 @@
"_components": [ "_components": [
{ {
"__id__": 6 "__id__": 6
},
{
"__id__": 7
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -345,33 +342,6 @@ ...@@ -345,33 +342,6 @@
"_atlas": null, "_atlas": null,
"_id": "97/S6HDq9MeqgmV1Zwnhbb" "_id": "97/S6HDq9MeqgmV1Zwnhbb"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1280,
"_originalHeight": 720,
"_id": "22UEd7959KSIqkR8XOVgCQ"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "背景素材", "_name": "背景素材",
...@@ -383,10 +353,10 @@ ...@@ -383,10 +353,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 8
}, },
{ {
"__id__": 10 "__id__": 9
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -406,14 +376,14 @@ ...@@ -406,14 +376,14 @@
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0.5 "y": 0
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-114.5, -360,
0, 0,
0, 0,
0, 0,
...@@ -442,7 +412,7 @@ ...@@ -442,7 +412,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 8 "__id__": 7
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -474,14 +444,14 @@ ...@@ -474,14 +444,14 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 8 "__id__": 7
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 44, "_alignFlags": 4,
"_left": -43.5, "_left": 0,
"_right": -43.5, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
...@@ -492,9 +462,9 @@ ...@@ -492,9 +462,9 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 1367, "_originalWidth": 0,
"_originalHeight": 0, "_originalHeight": 0,
"_id": "a2PP5WtJJIbbhkwiBa55OG" "_id": "91iLfih5NGNKIiqkhH3KfE"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -507,10 +477,10 @@ ...@@ -507,10 +477,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 12 "__id__": 11
}, },
{ {
"__id__": 13 "__id__": 12
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -530,14 +500,14 @@ ...@@ -530,14 +500,14 @@
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0.5,
"y": 0.5 "y": 0
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-313, -360,
0, 0,
0, 0,
0, 0,
...@@ -566,7 +536,7 @@ ...@@ -566,7 +536,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 10
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -598,12 +568,12 @@ ...@@ -598,12 +568,12 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 11 "__id__": 10
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 44, "_alignFlags": 4,
"_left": 0, "_left": 0,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
...@@ -616,9 +586,9 @@ ...@@ -616,9 +586,9 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 1280, "_originalWidth": 0,
"_originalHeight": 0, "_originalHeight": 0,
"_id": "731B60fRFMWIHskXUQxEbk" "_id": "cdgI63CetEZ7s30ELGP8dg"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -629,19 +599,19 @@ ...@@ -629,19 +599,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 15 "__id__": 14
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 19 "__id__": 18
}, },
{ {
"__id__": 20 "__id__": 19
}, },
{ {
"__id__": 21 "__id__": 20
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -697,19 +667,19 @@ ...@@ -697,19 +667,19 @@
"_name": "label", "_name": "label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 14 "__id__": 13
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 16 "__id__": 15
}, },
{ {
"__id__": 17 "__id__": 16
}, },
{ {
"__id__": 18 "__id__": 17
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -765,7 +735,7 @@ ...@@ -765,7 +735,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 15 "__id__": 14
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -801,7 +771,7 @@ ...@@ -801,7 +771,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 15 "__id__": 14
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -828,7 +798,7 @@ ...@@ -828,7 +798,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 15 "__id__": 14
}, },
"_enabled": true, "_enabled": true,
"_color": { "_color": {
...@@ -846,7 +816,7 @@ ...@@ -846,7 +816,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 13
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -878,7 +848,7 @@ ...@@ -878,7 +848,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 13
}, },
"_enabled": true, "_enabled": true,
"alignMode": 2, "alignMode": 2,
...@@ -905,7 +875,7 @@ ...@@ -905,7 +875,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 14 "__id__": 13
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -914,7 +884,7 @@ ...@@ -914,7 +884,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 22 "__id__": 21
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -991,19 +961,19 @@ ...@@ -991,19 +961,19 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 24 "__id__": 23
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 26 "__id__": 25
}, },
{ {
"__id__": 27 "__id__": 26
}, },
{ {
"__id__": 28 "__id__": 27
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1059,13 +1029,13 @@ ...@@ -1059,13 +1029,13 @@
"_name": "label", "_name": "label",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 23 "__id__": 22
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 25 "__id__": 24
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1121,7 +1091,7 @@ ...@@ -1121,7 +1091,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 24 "__id__": 23
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1157,7 +1127,7 @@ ...@@ -1157,7 +1127,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 23 "__id__": 22
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1189,7 +1159,7 @@ ...@@ -1189,7 +1159,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 23 "__id__": 22
}, },
"_enabled": true, "_enabled": true,
"alignMode": 2, "alignMode": 2,
...@@ -1216,7 +1186,7 @@ ...@@ -1216,7 +1186,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 23 "__id__": 22
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -1225,7 +1195,7 @@ ...@@ -1225,7 +1195,7 @@
"zoomScale": 1.2, "zoomScale": 1.2,
"clickEvents": [ "clickEvents": [
{ {
"__id__": 29 "__id__": 28
} }
], ],
"_N$interactable": true, "_N$interactable": true,
...@@ -1304,10 +1274,10 @@ ...@@ -1304,10 +1274,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 31 "__id__": 30
}, },
{ {
"__id__": 32 "__id__": 31
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1363,7 +1333,7 @@ ...@@ -1363,7 +1333,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 30 "__id__": 29
}, },
"_enabled": true, "_enabled": true,
"alignMode": 2, "alignMode": 2,
...@@ -1390,7 +1360,7 @@ ...@@ -1390,7 +1360,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 30 "__id__": 29
}, },
"_enabled": true, "_enabled": true,
"_layoutSize": { "_layoutSize": {
...@@ -1470,13 +1440,13 @@ ...@@ -1470,13 +1440,13 @@
}, },
"_enabled": true, "_enabled": true,
"options": { "options": {
"__id__": 30 "__id__": 29
}, },
"title": { "title": {
"__id__": 16 "__id__": 15
}, },
"question": { "question": {
"__id__": 25 "__id__": 24
}, },
"openMusic": { "openMusic": {
"__uuid__": "82894da6-cdf9-4aa2-be54-0d5f3b8c4ff6" "__uuid__": "82894da6-cdf9-4aa2-be54-0d5f3b8c4ff6"
...@@ -1487,6 +1457,12 @@ ...@@ -1487,6 +1457,12 @@
"op_2": { "op_2": {
"__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e" "__uuid__": "e4ef9fc9-937c-46a9-86a0-51a30401974e"
}, },
"cloud": {
"__id__": 10
},
"che": {
"__id__": 7
},
"_isPlayTitle": false, "_isPlayTitle": false,
"_isPlayQuestion": false, "_isPlayQuestion": false,
"_id": "e687yyoRBIzZAOVRL8Sseh" "_id": "e687yyoRBIzZAOVRL8Sseh"
......
...@@ -37,10 +37,26 @@ cc.Class({ ...@@ -37,10 +37,26 @@ cc.Class({
type: cc.Prefab, type: cc.Prefab,
}, },
cloud: {
default: null,
type: cc.Node,
},
che: {
default: null,
type: cc.Node,
},
_isPlayTitle: false, _isPlayTitle: false,
_isPlayQuestion: false, _isPlayQuestion: false,
}, },
onEnable() {
cc.game.on("STOPALL", this.stopAllAudio, this);
},
onDisable() {
cc.game.off("STOPALL", this.stopAllAudio, this);
},
// 生命周期 onLoad // 生命周期 onLoad
onLoad() { onLoad() {
this.initSceneData(); this.initSceneData();
...@@ -195,6 +211,7 @@ cc.Class({ ...@@ -195,6 +211,7 @@ cc.Class({
playTitle() { playTitle() {
if (this.data.audio_title && !this._isPlayTitle) { if (this.data.audio_title && !this._isPlayTitle) {
cc.game.emit("STOPALL");
this._isPlayTitle = true; this._isPlayTitle = true;
this.playAudioByUrl(this.data.audio_title, () => { this.playAudioByUrl(this.data.audio_title, () => {
this._isPlayTitle = false; this._isPlayTitle = false;
...@@ -204,6 +221,7 @@ cc.Class({ ...@@ -204,6 +221,7 @@ cc.Class({
playQuestion() { playQuestion() {
if (this.data.audio_question && !this._isPlayQuestion) { if (this.data.audio_question && !this._isPlayQuestion) {
cc.game.emit("STOPALL");
this._isPlayQuestion = true; this._isPlayQuestion = true;
this.playAudioByUrl(this.data.audio_question, () => { this.playAudioByUrl(this.data.audio_question, () => {
this._isPlayQuestion = false; this._isPlayQuestion = false;
...@@ -214,6 +232,8 @@ cc.Class({ ...@@ -214,6 +232,8 @@ cc.Class({
initBg() { initBg() {
const bgNode = cc.find("Canvas/bg"); const bgNode = cc.find("Canvas/bg");
bgNode.scale = this._mapScaleMax; bgNode.scale = this._mapScaleMax;
this.che.scale = this._mapScaleMax;
this.cloud.scale = this._mapScaleMax;
}, },
// ------------------------------------------------ // ------------------------------------------------
...@@ -257,5 +277,11 @@ cc.Class({ ...@@ -257,5 +277,11 @@ cc.Class({
} }
}, },
stopAllAudio() {
cc.audioEngine.stopAllEffects();
this._isPlayQuestion = false;
this._isPlayTitle = false;
},
// ------------------------------------------ // ------------------------------------------
}); });
...@@ -46,10 +46,13 @@ cc.Class({ ...@@ -46,10 +46,13 @@ cc.Class({
onEnable() { onEnable() {
cc.game.on("DONE", this.setDone, this); cc.game.on("DONE", this.setDone, this);
cc.game.on("STOPALL", this.stopAllAudio, this);
this._allowClick = true; this._allowClick = true;
}, },
onDisable() { onDisable() {
cc.game.off("DONE", this.setDone, this); cc.game.off("DONE", this.setDone, this);
cc.game.off("STOPALL", this.stopAllAudio, this);
}, },
setPic(pic_url) { setPic(pic_url) {
...@@ -88,6 +91,7 @@ cc.Class({ ...@@ -88,6 +91,7 @@ cc.Class({
clickTitle() { clickTitle() {
if (this._audioTitle != null && !this._isPlaying) { if (this._audioTitle != null && !this._isPlaying) {
cc.game.emit("STOPALL");
this._isPlaying = true; this._isPlaying = true;
cc.assetManager.loadRemote(this._audioTitle, (err, audioClip) => { cc.assetManager.loadRemote(this._audioTitle, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false); const audioId = cc.audioEngine.play(audioClip, false);
...@@ -103,6 +107,7 @@ cc.Class({ ...@@ -103,6 +107,7 @@ cc.Class({
return; return;
} }
cc.game.emit("STOPALL");
this.picSelected.active = true; this.picSelected.active = true;
if (this._isAnswer) { if (this._isAnswer) {
cc.audioEngine.playEffect(this.soundCorrect); cc.audioEngine.playEffect(this.soundCorrect);
...@@ -121,4 +126,9 @@ cc.Class({ ...@@ -121,4 +126,9 @@ cc.Class({
setDone() { setDone() {
this._isDone = true; this._isDone = true;
}, },
stopAllAudio() {
cc.audioEngine.stopAllEffects();
this._isPlaying = false;
},
}); });
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": -0.5, "offsetX": 0,
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 968, "width": 323,
"height": 540, "height": 180,
"rawWidth": 969, "rawWidth": 323,
"rawHeight": 540, "rawHeight": 180,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
play/assets/tmpGame/textures/图片.png

67.6 KB | W: | H:

play/assets/tmpGame/textures/图片.png

66.1 KB | W: | H:

play/assets/tmpGame/textures/图片.png
play/assets/tmpGame/textures/图片.png
play/assets/tmpGame/textures/图片.png
play/assets/tmpGame/textures/图片.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 246, "width": 243,
"height": 180, "height": 180,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 246, "width": 243,
"height": 180, "height": 180,
"rawWidth": 246, "rawWidth": 243,
"rawHeight": 180, "rawHeight": 180,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 293, "width": 296,
"height": 352, "height": 363,
"rawWidth": 293, "rawWidth": 296,
"rawHeight": 352, "rawHeight": 363,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
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