Commit 8799e407 authored by Vũ Gia Vương's avatar Vũ Gia Vương

update tutorial

parent c3ca71ee
...@@ -81,25 +81,25 @@ ...@@ -81,25 +81,25 @@
"__id__": 64 "__id__": 64
}, },
{ {
"__id__": 75 "__id__": 79
}, },
{ {
"__id__": 28 "__id__": 28
}, },
{ {
"__id__": 77 "__id__": 81
}, },
{ {
"__id__": 94 "__id__": 98
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 104 "__id__": 108
}, },
{ {
"__id__": 105 "__id__": 109
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1089,7 +1089,7 @@ ...@@ -1089,7 +1089,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Tutorial", "_name": "Tutorial Rotate",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 11 "__id__": 11
...@@ -1248,14 +1248,14 @@ ...@@ -1248,14 +1248,14 @@
"_id": "3acfhv1OhPAYoRVG4bL+nM" "_id": "3acfhv1OhPAYoRVG4bL+nM"
}, },
{ {
"__type__": "3bfa6XaM1BBHaYcmhPbj7Up", "__type__": "245c48ce35CRLV2V9GMpP7F",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 22 "__id__": 22
}, },
"_enabled": true, "_enabled": true,
"_id": "99fWoGTUJKz76BlZwBaPbt" "_id": "d4FPzvmYhLzKDMGhWyEnXj"
}, },
{ {
"__type__": "4cdbdL97VxHIokBkhUMm2qL", "__type__": "4cdbdL97VxHIokBkhUMm2qL",
...@@ -3096,12 +3096,15 @@ ...@@ -3096,12 +3096,15 @@
}, },
{ {
"__id__": 70 "__id__": 70
},
{
"__id__": 74
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 74 "__id__": 78
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3553,6 +3556,176 @@ ...@@ -3553,6 +3556,176 @@
"_enabled": true, "_enabled": true,
"_id": "74FwAooblKp5Uz0cmQR1wo" "_id": "74FwAooblKp5Uz0cmQR1wo"
}, },
{
"__type__": "cc.Node",
"_name": "Tutorial Tap",
"_objFlags": 0,
"_parent": {
"__id__": 64
},
"_children": [
{
"__id__": 75
}
],
"_active": true,
"_components": [
{
"__id__": 77
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-549.195,
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": "467luIdkBK0LR1x6YRtJbt"
},
{
"__type__": "cc.Node",
"_name": "hand",
"_objFlags": 0,
"_parent": {
"__id__": 74
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 76
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 215,
"height": 291
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "caQZkoMwFAiLFA77kinSZC"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "bb4b8653-efdf-49ce-b06e-3e199eddbc6f"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "52umma+txE144XgKjvNC8l"
},
{
"__type__": "2c2cbdHwQFCdpQMA/zXzBGt",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 74
},
"_enabled": true,
"_id": "e7adhzbtVIXItHuXv9Y+hG"
},
{ {
"__type__": "1310bpqizlA157YGiuO40IK", "__type__": "1310bpqizlA157YGiuO40IK",
"_name": "", "_name": "",
...@@ -3580,7 +3753,7 @@ ...@@ -3580,7 +3753,7 @@
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 76 "__id__": 80
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3636,7 +3809,7 @@ ...@@ -3636,7 +3809,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 75 "__id__": 79
}, },
"_enabled": true, "_enabled": true,
"_id": "96hHP+ssxLNpn8/i2AKAyI" "_id": "96hHP+ssxLNpn8/i2AKAyI"
...@@ -3650,25 +3823,25 @@ ...@@ -3650,25 +3823,25 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 78 "__id__": 82
}, },
{ {
"__id__": 80 "__id__": 84
}, },
{ {
"__id__": 83 "__id__": 87
}, },
{ {
"__id__": 85 "__id__": 89
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 92 "__id__": 96
}, },
{ {
"__id__": 93 "__id__": 97
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3724,13 +3897,13 @@ ...@@ -3724,13 +3897,13 @@
"_name": "Mask copy", "_name": "Mask copy",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 77 "__id__": 81
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 79 "__id__": 83
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3786,7 +3959,7 @@ ...@@ -3786,7 +3959,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 78 "__id__": 82
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3818,16 +3991,16 @@ ...@@ -3818,16 +3991,16 @@
"_name": "The", "_name": "The",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 77 "__id__": 81
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 81 "__id__": 85
}, },
{ {
"__id__": 82 "__id__": 86
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3883,7 +4056,7 @@ ...@@ -3883,7 +4056,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 80 "__id__": 84
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3925,7 +4098,7 @@ ...@@ -3925,7 +4098,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 80 "__id__": 84
}, },
"_enabled": true, "_enabled": true,
"_id": "8aU9CpQKRFmJMSMUCpaItu" "_id": "8aU9CpQKRFmJMSMUCpaItu"
...@@ -3935,13 +4108,13 @@ ...@@ -3935,13 +4108,13 @@
"_name": "text1", "_name": "text1",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 77 "__id__": 81
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 84 "__id__": 88
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3997,7 +4170,7 @@ ...@@ -3997,7 +4170,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 83 "__id__": 87
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4029,17 +4202,17 @@ ...@@ -4029,17 +4202,17 @@
"_name": "Replay Button", "_name": "Replay Button",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 77 "__id__": 81
}, },
"_children": [ "_children": [
{ {
"__id__": 86 "__id__": 90
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 91 "__id__": 95
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4095,20 +4268,20 @@ ...@@ -4095,20 +4268,20 @@
"_name": "Background", "_name": "Background",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 85 "__id__": 89
}, },
"_children": [ "_children": [
{ {
"__id__": 87 "__id__": 91
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 89 "__id__": 93
}, },
{ {
"__id__": 90 "__id__": 94
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4164,13 +4337,13 @@ ...@@ -4164,13 +4337,13 @@
"_name": "Label", "_name": "Label",
"_objFlags": 512, "_objFlags": 512,
"_parent": { "_parent": {
"__id__": 86 "__id__": 90
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 88 "__id__": 92
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4226,7 +4399,7 @@ ...@@ -4226,7 +4399,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 87 "__id__": 91
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4261,7 +4434,7 @@ ...@@ -4261,7 +4434,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 86 "__id__": 90
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4293,7 +4466,7 @@ ...@@ -4293,7 +4466,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 86 "__id__": 90
}, },
"_enabled": true, "_enabled": true,
"alignMode": 0, "alignMode": 0,
...@@ -4320,7 +4493,7 @@ ...@@ -4320,7 +4493,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 85 "__id__": 89
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -4393,7 +4566,7 @@ ...@@ -4393,7 +4566,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
}, },
"_N$target": { "_N$target": {
"__id__": 86 "__id__": 90
}, },
"_id": "adCMRaOEVD5LOjd7MAm9EO" "_id": "adCMRaOEVD5LOjd7MAm9EO"
}, },
...@@ -4402,7 +4575,7 @@ ...@@ -4402,7 +4575,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 77 "__id__": 81
}, },
"_enabled": true, "_enabled": true,
"_id": "bcaw0ZNyRPGoK8ATotq1yF" "_id": "bcaw0ZNyRPGoK8ATotq1yF"
...@@ -4412,7 +4585,7 @@ ...@@ -4412,7 +4585,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 77 "__id__": 81
}, },
"_enabled": true, "_enabled": true,
"_id": "17J7OqMb1NsbF4iJiNTrDS" "_id": "17J7OqMb1NsbF4iJiNTrDS"
...@@ -4426,22 +4599,22 @@ ...@@ -4426,22 +4599,22 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 95 "__id__": 99
}, },
{ {
"__id__": 97 "__id__": 101
}, },
{ {
"__id__": 99 "__id__": 103
}, },
{ {
"__id__": 101 "__id__": 105
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 103 "__id__": 107
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4497,13 +4670,13 @@ ...@@ -4497,13 +4670,13 @@
"_name": "beer-bottle-rolling-on-a-sidewalk-82234", "_name": "beer-bottle-rolling-on-a-sidewalk-82234",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 94 "__id__": 98
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 96 "__id__": 100
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4559,7 +4732,7 @@ ...@@ -4559,7 +4732,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 95 "__id__": 99
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
...@@ -4578,13 +4751,13 @@ ...@@ -4578,13 +4751,13 @@
"_name": "Cartoon Short Version 2_01", "_name": "Cartoon Short Version 2_01",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 94 "__id__": 98
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 98 "__id__": 102
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4640,7 +4813,7 @@ ...@@ -4640,7 +4813,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 97 "__id__": 101
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
...@@ -4659,13 +4832,13 @@ ...@@ -4659,13 +4832,13 @@
"_name": "tieng_va_cham_chai_thuy_tinh-www_tiengdong_com", "_name": "tieng_va_cham_chai_thuy_tinh-www_tiengdong_com",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 94 "__id__": 98
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 100 "__id__": 104
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4721,7 +4894,7 @@ ...@@ -4721,7 +4894,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 99 "__id__": 103
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
...@@ -4740,13 +4913,13 @@ ...@@ -4740,13 +4913,13 @@
"_name": "breaking-a-vase-remix-87091", "_name": "breaking-a-vase-remix-87091",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 94 "__id__": 98
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 102 "__id__": 106
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4802,7 +4975,7 @@ ...@@ -4802,7 +4975,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 101 "__id__": 105
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
...@@ -4821,17 +4994,17 @@ ...@@ -4821,17 +4994,17 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 94 "__id__": 98
}, },
"_enabled": true, "_enabled": true,
"rollingSound": { "rollingSound": {
"__id__": 96 "__id__": 100
}, },
"breakingSound": { "breakingSound": {
"__id__": 102 "__id__": 106
}, },
"dropSound": { "dropSound": {
"__id__": 100 "__id__": 104
}, },
"_id": "a5vu6IE1ROn6VO7UPM9J3p" "_id": "a5vu6IE1ROn6VO7UPM9J3p"
}, },
......
...@@ -17,4 +17,6 @@ export const PLAY_ANIM_NUT3 = 'PLAY_ANIM_NUT3'; ...@@ -17,4 +17,6 @@ export const PLAY_ANIM_NUT3 = 'PLAY_ANIM_NUT3';
export const PLAY_ANIM_NUT4 = 'PLAY_ANIM_NUT4'; export const PLAY_ANIM_NUT4 = 'PLAY_ANIM_NUT4';
export const ROTATE_GUILD = 'ROTATE_GUILD'; export const ROTATE_GUILD = 'ROTATE_GUILD';
export const STOP_GUILD = 'STOP_GUILD'; export const BEAT_GUILD = 'BEAT_GUILD';
\ No newline at end of file export const STOP_GUILD_ROTATE = 'STOP_GUILD_ROTATE';
export const STOP_GUILD_TAP = 'STOP_GUILD_TAP';
\ No newline at end of file
import { eventTarget, PLAY_ANIM_NUT1, PLAY_ANIM_NUT2, PLAY_ANIM_NUT3, PLAY_ANIM_NUT4, PLAY_BREAKING_SOUND, PLAY_DROP_SOUND, SHOW_CARD_POPUP } from "../Events"; import { BEAT_GUILD, eventTarget, PLAY_ANIM_NUT1, PLAY_ANIM_NUT2, PLAY_ANIM_NUT3, PLAY_ANIM_NUT4, PLAY_BREAKING_SOUND, PLAY_DROP_SOUND, SHOW_CARD_POPUP, STOP_GUILD_TAP } from "../Events";
import { Global } from "../Global"; import { Global } from "../Global";
...@@ -20,6 +20,14 @@ export default class BuaController extends cc.Component { ...@@ -20,6 +20,14 @@ export default class BuaController extends cc.Component {
this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this); this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this); this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
this._actions = [this.playAnimationDap1, this.playAnimationDap2, this.playAnimationDap3, this.playAnimationDap4]; this._actions = [this.playAnimationDap1, this.playAnimationDap2, this.playAnimationDap3, this.playAnimationDap4];
eventTarget.on(BEAT_GUILD, this.beatGuild, this);
}
private beatGuild() {
this.spine.setAnimation(0, "Dap2", false);
this.spine.timeScale = 1.3;
this.playSound();
} }
public onSetTool() { public onSetTool() {
...@@ -35,12 +43,13 @@ export default class BuaController extends cc.Component { ...@@ -35,12 +43,13 @@ export default class BuaController extends cc.Component {
} }
private onTouchStart(): void { private onTouchStart(): void {
if(!this._isPlay){ eventTarget.emit(STOP_GUILD_TAP);
if (!this._isPlay) {
return; return;
} }
this._actions[Global.tool + this._count].bind(this)(); this._actions[Global.tool + this._count].bind(this)();
this._count++; this._count++;
if(Global.tool + this._count > 3 ){ if (Global.tool + this._count > 3) {
this._isPlay = false; this._isPlay = false;
} }
} }
......
import { eventTarget, PLAY_ROLLING_SOUND, ROTATE_GUILD, STOP_GUILD } from "../Events"; import { eventTarget, PLAY_ROLLING_SOUND, ROTATE_GUILD, STOP_GUILD_ROTATE } from "../Events";
import { TrackEntry } from "../Utils"; import { TrackEntry } from "../Utils";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
...@@ -50,8 +50,8 @@ export default class HuController extends cc.Component { ...@@ -50,8 +50,8 @@ export default class HuController extends cc.Component {
} }
private onTouchStart(event: cc.Event.EventTouch): void { private onTouchStart(event: cc.Event.EventTouch): void {
eventTarget.emit(STOP_GUILD); eventTarget.emit(STOP_GUILD_ROTATE);
// if (!this._pointStart) { // if (!this._pointStart) {
// this.setRotateAnim(); // this.setRotateAnim();
// } // }
......
{
"ver": "1.1.3",
"uuid": "3d0048a6-0bc0-4625-a1b9-e7efb330f291",
"importer": "folder",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
import { eventTarget, ROTATE_GUILD, STOP_GUILD } from "../Events"; import { eventTarget, ROTATE_GUILD, STOP_GUILD_ROTATE } from "../Events";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
@ccclass @ccclass
export default class TutorialController extends cc.Component { export default class RotateTutorialController extends cc.Component {
private _hand: cc.Node; private _hand: cc.Node;
protected onLoad(): void { protected onLoad(): void {
[this._hand] = this.node.children; [this._hand] = this.node.children;
eventTarget.on(STOP_GUILD_ROTATE, this.stopGuild, this);
this.tutorialRotate(); this.tutorialRotate();
eventTarget.on(STOP_GUILD, this.stopGuild, this);
} }
private stopGuild() { private stopGuild() {
...@@ -20,7 +20,7 @@ export default class TutorialController extends cc.Component { ...@@ -20,7 +20,7 @@ export default class TutorialController extends cc.Component {
private tutorialRotate() { private tutorialRotate() {
this._hand.active = true; this._hand.active = true;
cc.tween(this._hand) cc.tween(this._hand)
.repeatForever(cc.tween(this._hand) .repeatForever(cc.tween(this._hand)
.to(0, { position: cc.v3(350) }, { easing: 'easingOutQuad' }) .to(0, { position: cc.v3(350) }, { easing: 'easingOutQuad' })
......
{ {
"ver": "1.1.0", "ver": "1.1.0",
"uuid": "3bfa65da-3350-411d-a61c-9a13db8fb529", "uuid": "245c4f1c-7b7e-4244-b576-57d18ca4fec5",
"importer": "typescript", "importer": "typescript",
"isPlugin": false, "isPlugin": false,
"loadPluginInWeb": true, "loadPluginInWeb": true,
......
import { BEAT_GUILD, eventTarget, STOP_GUILD_TAP } from "../Events";
const { ccclass, property } = cc._decorator;
@ccclass
export default class TapTutorialController extends cc.Component {
private _hand: cc.Node;
protected onLoad(): void {
[this._hand] = this.node.children;
eventTarget.on(STOP_GUILD_TAP, this.stopGuild, this);
this.tutorialTap();
}
private stopGuild() {
cc.Tween.stopAllByTarget(this._hand);
this._hand.active = false;
}
private tutorialTap() {
this._hand.active = true;
cc.tween(this._hand)
.repeatForever(cc.tween(this._hand)
.to(0, { position: cc.v3(120, 100) }, { easing: 'easingOutQuad' })
.to(0.2, { angle: 15 }, { easing: 'easingInQuad' })
.to(0.2, { angle: -15 })
.to(0.15, { position: cc.v3(110, 80) })
.call(() => eventTarget.emit(BEAT_GUILD))
.delay(0.8)
)
.start();
}
}
{
"ver": "1.1.0",
"uuid": "2c2cb747-c101-4276-940c-03fcd7cc11ad",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"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