Commit 78d981b1 authored by 杨一航's avatar 杨一航

fix

parent 8be0844f
......@@ -87,31 +87,31 @@
"__id__": 131
},
{
"__id__": 147
"__id__": 148
},
{
"__id__": 155
"__id__": 156
},
{
"__id__": 172
"__id__": 173
},
{
"__id__": 174
"__id__": 175
},
{
"__id__": 193
"__id__": 194
}
],
"_active": true,
"_components": [
{
"__id__": 200
},
{
"__id__": 201
},
{
"__id__": 202
},
{
"__id__": 203
}
],
"_prefab": null,
......@@ -579,7 +579,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-512.696,
-560,
-294.691,
0,
0,
......@@ -1265,7 +1265,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
423.242,
480,
-286.41,
0,
0,
......@@ -7129,6 +7129,9 @@
"_components": [
{
"__id__": 146
},
{
"__id__": 147
}
],
"_prefab": null,
......@@ -7154,8 +7157,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-370.582,
138.497,
136.014,
-155.32900000000004,
0,
0,
0,
......@@ -7219,6 +7222,33 @@
"_N$enableBatch": false,
"_id": "bbYRfD0aJNEot8/MDZFyAB"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 145
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 962.680736842105,
"_top": 0,
"_bottom": 562.8886230188912,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "77h7g4qVxG4aRDKIVz0ati"
},
{
"__type__": "cc.Node",
"_name": "endRoot",
......@@ -7228,13 +7258,13 @@
},
"_children": [
{
"__id__": 148
"__id__": 149
},
{
"__id__": 151
"__id__": 152
},
{
"__id__": 153
"__id__": 154
}
],
"_active": false,
......@@ -7292,16 +7322,16 @@
"_name": "endbg",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 148
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 149
"__id__": 150
},
{
"__id__": 150
"__id__": 151
}
],
"_prefab": null,
......@@ -7357,7 +7387,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 148
"__id__": 149
},
"_enabled": true,
"_materials": [
......@@ -7389,7 +7419,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 148
"__id__": 149
},
"_enabled": true,
"alignMode": 1,
......@@ -7416,13 +7446,13 @@
"_name": "loss",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 148
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 152
"__id__": 153
}
],
"_prefab": null,
......@@ -7478,7 +7508,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
"__id__": 152
},
"_enabled": true,
"_materials": [
......@@ -7510,13 +7540,13 @@
"_name": "win",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 148
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 154
"__id__": 155
}
],
"_prefab": null,
......@@ -7572,7 +7602,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 153
"__id__": 154
},
"_enabled": true,
"_materials": [
......@@ -7608,19 +7638,19 @@
},
"_children": [
{
"__id__": 156
"__id__": 157
},
{
"__id__": 160
"__id__": 161
}
],
"_active": false,
"_components": [
{
"__id__": 170
"__id__": 171
},
{
"__id__": 171
"__id__": 172
}
],
"_prefab": null,
......@@ -7676,19 +7706,19 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 155
"__id__": 156
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 157
},
{
"__id__": 158
},
{
"__id__": 159
},
{
"__id__": 160
}
],
"_prefab": null,
......@@ -7744,7 +7774,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 157
},
"_enabled": true,
"_materials": [
......@@ -7776,7 +7806,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 157
},
"_enabled": true,
"alignMode": 2,
......@@ -7803,7 +7833,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 157
},
"_enabled": true,
"_normalMaterial": null,
......@@ -7871,20 +7901,20 @@
"_name": "BtnFrame",
"_objFlags": 0,
"_parent": {
"__id__": 155
"__id__": 156
},
"_children": [
{
"__id__": 161
"__id__": 162
},
{
"__id__": 165
"__id__": 166
}
],
"_active": true,
"_components": [
{
"__id__": 169
"__id__": 170
}
],
"_prefab": null,
......@@ -7940,19 +7970,19 @@
"_name": "BtnExit",
"_objFlags": 0,
"_parent": {
"__id__": 160
"__id__": 161
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 162
},
{
"__id__": 163
},
{
"__id__": 164
},
{
"__id__": 165
}
],
"_prefab": null,
......@@ -8008,7 +8038,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
"__id__": 162
},
"_enabled": true,
"_materials": [
......@@ -8040,7 +8070,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
"__id__": 162
},
"_enabled": true,
"alignMode": 1,
......@@ -8067,7 +8097,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 161
"__id__": 162
},
"_enabled": true,
"_normalMaterial": null,
......@@ -8135,19 +8165,19 @@
"_name": "BtnPlayAgain",
"_objFlags": 0,
"_parent": {
"__id__": 160
"__id__": 161
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 166
},
{
"__id__": 167
},
{
"__id__": 168
},
{
"__id__": 169
}
],
"_prefab": null,
......@@ -8203,7 +8233,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 166
},
"_enabled": true,
"_materials": [
......@@ -8235,7 +8265,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 166
},
"_enabled": true,
"alignMode": 1,
......@@ -8262,7 +8292,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 166
},
"_enabled": true,
"_normalMaterial": null,
......@@ -8330,7 +8360,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 160
"__id__": 161
},
"_enabled": true,
"_materials": [
......@@ -8362,7 +8392,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 155
"__id__": 156
},
"_enabled": true,
"alignMode": 2,
......@@ -8389,7 +8419,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 155
"__id__": 156
},
"_enabled": true,
"_id": "09WU6NXc9OR4frB91TsN13"
......@@ -8405,7 +8435,7 @@
"_active": false,
"_components": [
{
"__id__": 173
"__id__": 174
}
],
"_prefab": null,
......@@ -8461,7 +8491,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 172
"__id__": 173
},
"_enabled": true,
"_materials": [
......@@ -8497,31 +8527,31 @@
},
"_children": [
{
"__id__": 175
"__id__": 176
},
{
"__id__": 177
"__id__": 178
},
{
"__id__": 179
"__id__": 180
},
{
"__id__": 181
"__id__": 182
},
{
"__id__": 183
"__id__": 184
},
{
"__id__": 185
"__id__": 186
},
{
"__id__": 187
"__id__": 188
},
{
"__id__": 189
"__id__": 190
},
{
"__id__": 191
"__id__": 192
}
],
"_active": true,
......@@ -8579,13 +8609,13 @@
"_name": "wrong",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 176
"__id__": 177
}
],
"_prefab": null,
......@@ -8641,7 +8671,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 175
"__id__": 176
},
"_enabled": true,
"_clip": {
......@@ -8660,13 +8690,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 178
"__id__": 179
}
],
"_prefab": null,
......@@ -8722,7 +8752,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 177
"__id__": 178
},
"_enabled": true,
"_clip": {
......@@ -8741,13 +8771,13 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 180
"__id__": 181
}
],
"_prefab": null,
......@@ -8803,7 +8833,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 179
"__id__": 180
},
"_enabled": true,
"_clip": {
......@@ -8822,13 +8852,13 @@
"_name": "win",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 182
"__id__": 183
}
],
"_prefab": null,
......@@ -8884,7 +8914,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 181
"__id__": 182
},
"_enabled": true,
"_clip": {
......@@ -8903,13 +8933,13 @@
"_name": "loss",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 184
"__id__": 185
}
],
"_prefab": null,
......@@ -8965,7 +8995,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 183
"__id__": 184
},
"_enabled": true,
"_clip": {
......@@ -8984,13 +9014,13 @@
"_name": "piece",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 186
"__id__": 187
}
],
"_prefab": null,
......@@ -9046,7 +9076,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
"__id__": 186
},
"_enabled": true,
"_clip": {
......@@ -9065,13 +9095,13 @@
"_name": "match",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 188
"__id__": 189
}
],
"_prefab": null,
......@@ -9127,7 +9157,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 187
"__id__": 188
},
"_enabled": true,
"_clip": {
......@@ -9146,13 +9176,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 190
"__id__": 191
}
],
"_prefab": null,
......@@ -9208,7 +9238,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 189
"__id__": 190
},
"_enabled": true,
"_clip": {
......@@ -9227,13 +9257,13 @@
"_name": "grow",
"_objFlags": 0,
"_parent": {
"__id__": 174
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 192
"__id__": 193
}
],
"_prefab": null,
......@@ -9289,7 +9319,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 191
"__id__": 192
},
"_enabled": true,
"_clip": {
......@@ -9312,10 +9342,10 @@
},
"_children": [
{
"__id__": 194
"__id__": 195
},
{
"__id__": 197
"__id__": 198
}
],
"_active": false,
......@@ -9373,11 +9403,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 193
"__id__": 194
},
"_children": [
{
"__id__": 195
"__id__": 196
}
],
"_active": true,
......@@ -9435,13 +9465,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 194
"__id__": 195
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 196
"__id__": 197
}
],
"_prefab": null,
......@@ -9497,7 +9527,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 195
"__id__": 196
},
"_enabled": true,
"_materials": [],
......@@ -9528,11 +9558,11 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 193
"__id__": 194
},
"_children": [
{
"__id__": 198
"__id__": 199
}
],
"_active": true,
......@@ -9590,13 +9620,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 197
"__id__": 198
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 199
"__id__": 200
}
],
"_prefab": null,
......@@ -9652,7 +9682,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 198
"__id__": 199
},
"_enabled": true,
"_materials": [],
......
......@@ -30,6 +30,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private _redOriginPos: any;
private _blueOriginPos: any;
private _playingAudio: boolean;
private _canClick: any;
addPreloadImage() {
......@@ -239,7 +240,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
bgNode.scale = this._mapScaleMax;
const cover = cc.find("Canvas/cover")
cover.scale = this._mapScaleMax;
cover.width = cc.winSize.width;
cover.height = cc.winSize.height;
const endRoot = cc.find("Canvas/endRoot")
endRoot.scale = this._mapScaleMax;
......@@ -306,8 +308,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
case 0:
if (this.isMySide) {
this.normaltheDice();
this._canClick = false;
await this.showYourTurn();
this.blinkTheDice();
this._canClick = true;
} else {
this.greyDice();
}
......@@ -393,7 +397,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initListener() {
this.boardBtn.on("click", () => {
if (!this.isMySide || this._status.state != 0) {
if (!this.isMySide || this._status.state != 0 || !this._canClick) {
return;
}
this.playLocalAudio("btn");
......
......@@ -105,17 +105,17 @@ export class MyCocosSceneComponent extends cc.Component {
});
}
log (str) {
log(str) {
const node = cc.find('middleLayer');
if(node){
if (node) {
node.getComponent('middleLayer').log(str);
}else{
} else {
cc.log(str);
}
}
onLoadEnd() {
}
......@@ -132,7 +132,7 @@ export class MyCocosSceneComponent extends cc.Component {
// ------------------------------------------------
getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
......@@ -172,7 +172,7 @@ export class MyCocosSceneComponent extends cc.Component {
});
}
});
}else{
} else {
cb && cb();
}
}
......
export const defaultData = {
"gameStartAudio":
"http://staging-teach.cdn.ireadabc.com/7c18e0838dcf0707f885842ed09e1579.mp3",
"gameLoadingAudio":
"http://staging-teach.cdn.ireadabc.com/6b3846cee6afa2ae450234aeec835beb.mp3",
"waitingWheel":
"http://staging-teach.cdn.ireadabc.com/23376490a9ba0f4a3fe0618fc1c935e1.mp3",
"waitingPiece":
"http://staging-teach.cdn.ireadabc.com/b44fa51172b19b555fda30717c773027.mp3",
"waitingTurn":
"http://staging-teach.cdn.ireadabc.com/a6a5c388c636bc6d063946e91b4bd21a.mp3",
};
\ No newline at end of file
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