Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dap-hu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Gia Vương
dap-hu
Commits
8799e407
Commit
8799e407
authored
Apr 01, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tutorial
parent
c3ca71ee
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
319 additions
and
78 deletions
+319
-78
main.fire
assets/main.fire
+238
-65
Events.ts
assets/scripts/Events.ts
+3
-1
BuaController.ts
assets/scripts/GamePlay/BuaController.ts
+12
-3
HuController.ts
assets/scripts/GamePlay/HuController.ts
+3
-3
Tutorial.meta
assets/scripts/Tutorial.meta
+13
-0
RotateTutorialController.ts
assets/scripts/Tutorial/RotateTutorialController.ts
+5
-5
RotateTutorialController.ts.meta
assets/scripts/Tutorial/RotateTutorialController.ts.meta
+1
-1
TapTutorialController.ts
assets/scripts/Tutorial/TapTutorialController.ts
+34
-0
TapTutorialController.ts.meta
assets/scripts/Tutorial/TapTutorialController.ts.meta
+10
-0
No files found.
assets/main.fire
View file @
8799e407
This diff is collapsed.
Click to expand it.
assets/scripts/Events.ts
View file @
8799e407
...
@@ -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
assets/scripts/GamePlay/BuaController.ts
View file @
8799e407
import
{
eventTarget
,
PLAY_ANIM_NUT1
,
PLAY_ANIM_NUT2
,
PLAY_ANIM_NUT3
,
PLAY_ANIM_NUT4
,
PLAY_BREAKING_SOUND
,
PLAY_DROP_SOUND
,
SHOW_CARD_POPU
P
}
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_TA
P
}
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
;
}
}
}
}
...
...
assets/scripts/GamePlay/HuController.ts
View file @
8799e407
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,7 +50,7 @@ export default class HuController extends cc.Component {
...
@@ -50,7 +50,7 @@ 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();
...
...
assets/scripts/Tutorial.meta
0 → 100644
View file @
8799e407
{
"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
assets/scripts/
GamePlay/
TutorialController.ts
→
assets/scripts/
Tutorial/Rotate
TutorialController.ts
View file @
8799e407
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
()
{
...
...
assets/scripts/
GamePlay/
TutorialController.ts.meta
→
assets/scripts/
Tutorial/Rotate
TutorialController.ts.meta
View file @
8799e407
{
{
"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,
...
...
assets/scripts/Tutorial/TapTutorialController.ts
0 → 100644
View file @
8799e407
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
();
}
}
assets/scripts/Tutorial/TapTutorialController.ts.meta
0 → 100644
View file @
8799e407
{
"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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment