Commit b6c2c85b authored by 李维's avatar 李维

dev commit

parent 8ab90928
......@@ -129,8 +129,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
540.5,
257.5,
450,
250,
0,
0,
0,
......@@ -396,7 +396,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 99,
"height": 105
"height": 106
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -555,8 +555,8 @@
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": 50,
"_top": 50,
"_right": 140.5,
"_top": 57.5,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......
......@@ -17,7 +17,7 @@
"__id__": 2
},
{
"__id__": 144
"__id__": 147
}
],
"_active": false,
......@@ -90,13 +90,13 @@
"_active": true,
"_components": [
{
"__id__": 141
"__id__": 144
},
{
"__id__": 142
"__id__": 145
},
{
"__id__": 143
"__id__": 146
}
],
"_prefab": null,
......@@ -186,7 +186,7 @@
"array": [
0,
0,
525.6701448892809,
285.1253325490923,
0,
0,
0,
......@@ -5197,8 +5197,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-140.45,
-60.480000000000004,
0,
0,
0,
0,
0,
......@@ -5221,7 +5221,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "ecsuSvkLtI64IZFtMwx092"
"_id": "8ebsomqalCn6OHuWex6It2"
},
{
"__type__": "cc.Label",
......@@ -5257,7 +5257,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "f3eoQc0z9NgZyHen4wK5J6"
"_id": "cbXh+YuPpAm4ma92Thx2ao"
},
{
"__type__": "cc.PrivateNode",
......@@ -5296,8 +5296,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-74.68999999999998,
-60.480000000000004,
0,
0,
0,
0,
0,
......@@ -5320,7 +5320,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "c7SUujrB1EvLW7VLrBAmTZ"
"_id": "6doJ65m0tDOrevTdS1RUw0"
},
{
"__type__": "cc.Label",
......@@ -5356,7 +5356,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "3aJtAtiYVDcKJTsZI5lOuK"
"_id": "579nbfrw9JKYQuXd8k+2jZ"
},
{
"__type__": "cc.RichText",
......@@ -6632,6 +6632,9 @@
},
{
"__id__": 137
},
{
"__id__": 141
}
],
"_active": true,
......@@ -6647,8 +6650,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6727,8 +6730,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-575.5,
-292.5,
-1215.5,
-652.5,
0,
0,
0,
......@@ -6922,8 +6925,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
575.5,
-292.5,
1215.5,
-652.5,
0,
0,
0,
......@@ -7074,6 +7077,171 @@
"_N$target": null,
"_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",
"_name": "",
......@@ -7318,22 +7486,22 @@
},
"_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,
......@@ -7391,13 +7559,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 144
"__id__": 147
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 146
"__id__": 149
}
],
"_prefab": null,
......@@ -7453,7 +7621,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 145
"__id__": 148
},
"_enabled": true,
"_materials": [
......@@ -7485,13 +7653,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 144
"__id__": 147
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 148
"__id__": 151
}
],
"_prefab": null,
......@@ -7547,7 +7715,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 147
"__id__": 150
},
"_enabled": true,
"_materials": [
......@@ -7579,13 +7747,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 144
"__id__": 147
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 150
"__id__": 153
}
],
"_prefab": null,
......@@ -7641,7 +7809,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 149
"__id__": 152
},
"_enabled": true,
"_materials": [
......@@ -7673,13 +7841,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 144
"__id__": 147
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 152
"__id__": 155
}
],
"_prefab": null,
......@@ -7735,7 +7903,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 151
"__id__": 154
},
"_enabled": true,
"_materials": [
......@@ -7767,13 +7935,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 144
"__id__": 147
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 154
"__id__": 157
}
],
"_prefab": null,
......@@ -7829,7 +7997,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 153
"__id__": 156
},
"_enabled": true,
"_materials": [
......@@ -7861,13 +8029,13 @@
"_name": "bg_sahua",
"_objFlags": 0,
"_parent": {
"__id__": 144
"__id__": 147
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 156
"__id__": 159
}
],
"_prefab": null,
......@@ -7923,7 +8091,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 155
"__id__": 158
},
"_enabled": true,
"_materials": [
......
......@@ -281,6 +281,7 @@ cc.Class({
this._audioResList = [];
this._lastDrawPos = -1;
this._lastMainBg = 1;
this._enableRestart = true;
},
start() {
......@@ -340,6 +341,28 @@ cc.Class({
const bigLetterBase = cc.find('Canvas/LetterPicturePage/BigLetterBase');
const pictureWordSmallBg = cc.find('Canvas/LetterPicturePage/PictureWordSmallBg');
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', () => {
this.playEffect('按钮');
......@@ -431,6 +454,17 @@ cc.Class({
this.updateLetter();
},
restartGame() {
this._status = {
currentLetterIdx: 0,
currentStrokeIdx: 0,
currentStrokeStageIdx: 0
}
this.sharkNode.parent = null;
this.sharkNode = null;
this.updateLetter();
},
updateLetter() {
this.letter = this.data.letterList[this._status.currentLetterIdx];
this.letter = this.letter.toUpperCase();
......@@ -780,10 +814,8 @@ cc.Class({
sharkNode = this.sharkNode.getChildByName('SharkNode');
sharkNode.angle = angle;
sharkNode.active = !monkey;
const monkeyNode = this.sharkNode.getChildByName('MonkeyNode');
monkeyNode.active = monkey;
cc.tween(this.sharkNode)
.to(0.1, { x: startNode.x, y: startNode.y })
.start();
......@@ -915,6 +947,15 @@ cc.Class({
},
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.playEffect('放大');
await this.showCompleteStar();
......
module.exports = {
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