Commit b6c2c85b authored by 李维's avatar 李维

dev commit

parent 8ab90928
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
540.5, 450,
257.5, 250,
0, 0,
0, 0,
0, 0,
...@@ -396,7 +396,7 @@ ...@@ -396,7 +396,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 99, "width": 99,
"height": 105 "height": 106
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -555,8 +555,8 @@ ...@@ -555,8 +555,8 @@
"_target": null, "_target": null,
"_alignFlags": 33, "_alignFlags": 33,
"_left": 0, "_left": 0,
"_right": 50, "_right": 140.5,
"_top": 50, "_top": 57.5,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"__id__": 2 "__id__": 2
}, },
{ {
"__id__": 144 "__id__": 147
} }
], ],
"_active": false, "_active": false,
...@@ -90,13 +90,13 @@ ...@@ -90,13 +90,13 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 141 "__id__": 144
}, },
{ {
"__id__": 142 "__id__": 145
}, },
{ {
"__id__": 143 "__id__": 146
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
"array": [ "array": [
0, 0,
0, 0,
525.6701448892809, 285.1253325490923,
0, 0,
0, 0,
0, 0,
...@@ -5197,8 +5197,8 @@ ...@@ -5197,8 +5197,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-140.45, 0,
-60.480000000000004, 0,
0, 0,
0, 0,
0, 0,
...@@ -5221,7 +5221,7 @@ ...@@ -5221,7 +5221,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "ecsuSvkLtI64IZFtMwx092" "_id": "8ebsomqalCn6OHuWex6It2"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5257,7 +5257,7 @@ ...@@ -5257,7 +5257,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "f3eoQc0z9NgZyHen4wK5J6" "_id": "cbXh+YuPpAm4ma92Thx2ao"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -5296,8 +5296,8 @@ ...@@ -5296,8 +5296,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-74.68999999999998, 0,
-60.480000000000004, 0,
0, 0,
0, 0,
0, 0,
...@@ -5320,7 +5320,7 @@ ...@@ -5320,7 +5320,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "c7SUujrB1EvLW7VLrBAmTZ" "_id": "6doJ65m0tDOrevTdS1RUw0"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -5356,7 +5356,7 @@ ...@@ -5356,7 +5356,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "3aJtAtiYVDcKJTsZI5lOuK" "_id": "579nbfrw9JKYQuXd8k+2jZ"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -6632,6 +6632,9 @@ ...@@ -6632,6 +6632,9 @@
}, },
{ {
"__id__": 137 "__id__": 137
},
{
"__id__": 141
} }
], ],
"_active": true, "_active": true,
...@@ -6647,8 +6650,8 @@ ...@@ -6647,8 +6650,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 1280,
"height": 0 "height": 720
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -6727,8 +6730,8 @@ ...@@ -6727,8 +6730,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-575.5, -1215.5,
-292.5, -652.5,
0, 0,
0, 0,
0, 0,
...@@ -6922,8 +6925,8 @@ ...@@ -6922,8 +6925,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
575.5, 1215.5,
-292.5, -652.5,
0, 0,
0, 0,
0, 0,
...@@ -7074,6 +7077,171 @@ ...@@ -7074,6 +7077,171 @@
"_N$target": null, "_N$target": null,
"_id": "b6yVOtz7BJeqlb+JrIAz4X" "_id": "b6yVOtz7BJeqlb+JrIAz4X"
}, },
{
"__type__": "cc.Node",
"_name": "btn_restart",
"_objFlags": 0,
"_parent": {
"__id__": 132
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 142
},
{
"__id__": 143
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 47,
"height": 57
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
482.351,
-322.724,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8aETtop71MkacFR9f7BdFS"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 141
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "2bfb65e4-325b-470f-ad53-39b790b0b558"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "490KCfX8tPnIk40AzQ/M/J"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 141
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "f5rwEYBcROaZZCxpgVpca+"
},
{ {
"__type__": "cc.Canvas", "__type__": "cc.Canvas",
"_name": "", "_name": "",
...@@ -7318,22 +7486,22 @@ ...@@ -7318,22 +7486,22 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 145 "__id__": 148
}, },
{ {
"__id__": 147 "__id__": 150
}, },
{ {
"__id__": 149 "__id__": 152
}, },
{ {
"__id__": 151 "__id__": 154
}, },
{ {
"__id__": 153 "__id__": 156
}, },
{ {
"__id__": 155 "__id__": 158
} }
], ],
"_active": true, "_active": true,
...@@ -7391,13 +7559,13 @@ ...@@ -7391,13 +7559,13 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 147
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 146 "__id__": 149
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7453,7 +7621,7 @@ ...@@ -7453,7 +7621,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 145 "__id__": 148
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7485,13 +7653,13 @@ ...@@ -7485,13 +7653,13 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 147
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 148 "__id__": 151
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7547,7 +7715,7 @@ ...@@ -7547,7 +7715,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 147 "__id__": 150
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7579,13 +7747,13 @@ ...@@ -7579,13 +7747,13 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 147
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 150 "__id__": 153
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7641,7 +7809,7 @@ ...@@ -7641,7 +7809,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 149 "__id__": 152
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7673,13 +7841,13 @@ ...@@ -7673,13 +7841,13 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 147
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 152 "__id__": 155
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7735,7 +7903,7 @@ ...@@ -7735,7 +7903,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 151 "__id__": 154
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7767,13 +7935,13 @@ ...@@ -7767,13 +7935,13 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 147
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 154 "__id__": 157
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7829,7 +7997,7 @@ ...@@ -7829,7 +7997,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 153 "__id__": 156
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7861,13 +8029,13 @@ ...@@ -7861,13 +8029,13 @@
"_name": "bg_sahua", "_name": "bg_sahua",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 147
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 156 "__id__": 159
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7923,7 +8091,7 @@ ...@@ -7923,7 +8091,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 155 "__id__": 158
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
......
...@@ -281,6 +281,7 @@ cc.Class({ ...@@ -281,6 +281,7 @@ cc.Class({
this._audioResList = []; this._audioResList = [];
this._lastDrawPos = -1; this._lastDrawPos = -1;
this._lastMainBg = 1; this._lastMainBg = 1;
this._enableRestart = true;
}, },
start() { start() {
...@@ -340,6 +341,28 @@ cc.Class({ ...@@ -340,6 +341,28 @@ cc.Class({
const bigLetterBase = cc.find('Canvas/LetterPicturePage/BigLetterBase'); const bigLetterBase = cc.find('Canvas/LetterPicturePage/BigLetterBase');
const pictureWordSmallBg = cc.find('Canvas/LetterPicturePage/PictureWordSmallBg'); const pictureWordSmallBg = cc.find('Canvas/LetterPicturePage/PictureWordSmallBg');
const pictureWordBigBg = cc.find('Canvas/LetterPicturePage/PictureWordBigBg'); const pictureWordBigBg = cc.find('Canvas/LetterPicturePage/PictureWordBigBg');
const btn_restart = cc.find('Canvas/buttons/btn_restart');
btn_restart.on('click', async () => {
if(!this._enableRestart) {
return;
}
this._enableRestart = false;
this.playEffect('按钮');
await jelly(btn_restart);
btn_restart.active = false;
this.pageFlyOut();
this.restartGame();
setTimeout(() => {
btn_restart.active = true;
this._enableRestart = true;;
}, 1000);
// this.loadNextLetter()
// this.updateArrows(this._status.currentStrokeIdx);
// this.onSharkMoveEnd(event, 1);
// this._status.currentLetterIdx = Math.max(this._status.currentLetterIdx, 0);
// this.updateLetter();
});
btnSwitch.on('click', () => { btnSwitch.on('click', () => {
this.playEffect('按钮'); this.playEffect('按钮');
...@@ -431,6 +454,17 @@ cc.Class({ ...@@ -431,6 +454,17 @@ cc.Class({
this.updateLetter(); this.updateLetter();
}, },
restartGame() {
this._status = {
currentLetterIdx: 0,
currentStrokeIdx: 0,
currentStrokeStageIdx: 0
}
this.sharkNode.parent = null;
this.sharkNode = null;
this.updateLetter();
},
updateLetter() { updateLetter() {
this.letter = this.data.letterList[this._status.currentLetterIdx]; this.letter = this.data.letterList[this._status.currentLetterIdx];
this.letter = this.letter.toUpperCase(); this.letter = this.letter.toUpperCase();
...@@ -780,10 +814,8 @@ cc.Class({ ...@@ -780,10 +814,8 @@ cc.Class({
sharkNode = this.sharkNode.getChildByName('SharkNode'); sharkNode = this.sharkNode.getChildByName('SharkNode');
sharkNode.angle = angle; sharkNode.angle = angle;
sharkNode.active = !monkey; sharkNode.active = !monkey;
const monkeyNode = this.sharkNode.getChildByName('MonkeyNode'); const monkeyNode = this.sharkNode.getChildByName('MonkeyNode');
monkeyNode.active = monkey; monkeyNode.active = monkey;
cc.tween(this.sharkNode) cc.tween(this.sharkNode)
.to(0.1, { x: startNode.x, y: startNode.y }) .to(0.1, { x: startNode.x, y: startNode.y })
.start(); .start();
...@@ -915,6 +947,15 @@ cc.Class({ ...@@ -915,6 +947,15 @@ cc.Class({
}, },
async showOver() { async showOver() {
let btn_restart = cc.find('Canvas/buttons/btn_restart');
btn_restart.active = false;
// btn_restart.scaleX = 0;
// btn_restart.scaleY = 0;
setTimeout(() => {
// cc.tween(btn_restart).to(0.2, {scaleX: 1, scaleY: 1}).start();
btn_restart.active = true;
}, 5000);
this.hideShark(); this.hideShark();
this.playEffect('放大'); this.playEffect('放大');
await this.showCompleteStar(); await this.showCompleteStar();
......
module.exports = { module.exports = {
letterList: [ letterList: [
'a', 'b' 'g', 'u', 'x'
] ]
} }
{
"ver": "2.3.5",
"uuid": "49ca82b1-d04a-45be-b33d-a50a7ded4052",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 47,
"height": 57,
"platformSettings": {},
"subMetas": {
"btn_restart": {
"ver": "1.0.4",
"uuid": "2bfb65e4-325b-470f-ad53-39b790b0b558",
"rawTextureUuid": "49ca82b1-d04a-45be-b33d-a50a7ded4052",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 47,
"height": 57,
"rawWidth": 47,
"rawHeight": 57,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ 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