Commit b0f35644 authored by wangxin's avatar wangxin

beta 2

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