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
206d1651
Commit
206d1651
authored
Apr 02, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tutorial, sprite fragment
parent
4cd1b5ee
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
586 additions
and
230 deletions
+586
-230
main.fire
assets/main.fire
+396
-223
3 copy 2.png
assets/resources/manh_vun/3 copy 2.png
+0
-0
3 copy 2.png.meta
assets/resources/manh_vun/3 copy 2.png.meta
+38
-0
3 copy.png
assets/resources/manh_vun/3 copy.png
+0
-0
3 copy.png.meta
assets/resources/manh_vun/3 copy.png.meta
+38
-0
6 copy 2.png
assets/resources/manh_vun/6 copy 2.png
+0
-0
6 copy 2.png.meta
assets/resources/manh_vun/6 copy 2.png.meta
+38
-0
6 copy.png
assets/resources/manh_vun/6 copy.png
+0
-0
6 copy.png.meta
assets/resources/manh_vun/6 copy.png.meta
+38
-0
BreakingBottleController.ts
assets/scripts/GamePlay/BreakingBottleController.ts
+20
-5
TapTutorialController.ts
assets/scripts/Tutorial/TapTutorialController.ts
+18
-2
No files found.
assets/main.fire
View file @
206d1651
This diff is collapsed.
Click to expand it.
assets/resources/manh_vun/3 copy 2.png
0 → 100644
View file @
206d1651
21 KB
assets/resources/manh_vun/3 copy 2.png.meta
0 → 100644
View file @
206d1651
{
"ver": "2.3.7",
"uuid": "1dea3e9f-3ceb-4f42-830f-62d96c35878d",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 283,
"height": 199,
"platformSettings": {},
"subMetas": {
"3 copy 2": {
"ver": "1.0.6",
"uuid": "c75a5b3d-beed-44d2-b507-2b610bfcdf78",
"importer": "sprite-frame",
"rawTextureUuid": "1dea3e9f-3ceb-4f42-830f-62d96c35878d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 283,
"height": 199,
"rawWidth": 283,
"rawHeight": 199,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/resources/manh_vun/3 copy.png
0 → 100644
View file @
206d1651
35.7 KB
assets/resources/manh_vun/3 copy.png.meta
0 → 100644
View file @
206d1651
{
"ver": "2.3.7",
"uuid": "5fd52759-45a6-4b36-9832-1be50933da9d",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 237,
"height": 212,
"platformSettings": {},
"subMetas": {
"3 copy": {
"ver": "1.0.6",
"uuid": "d9decce6-590a-47b0-bad7-aee365a4b45a",
"importer": "sprite-frame",
"rawTextureUuid": "5fd52759-45a6-4b36-9832-1be50933da9d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 237,
"height": 212,
"rawWidth": 237,
"rawHeight": 212,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/resources/manh_vun/6 copy 2.png
0 → 100644
View file @
206d1651
17 KB
assets/resources/manh_vun/6 copy 2.png.meta
0 → 100644
View file @
206d1651
{
"ver": "2.3.7",
"uuid": "8d9e57b1-563f-40b3-aaed-cd8d4e8c6255",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 217,
"height": 225,
"platformSettings": {},
"subMetas": {
"6 copy 2": {
"ver": "1.0.6",
"uuid": "4176edff-03cb-4219-9c89-a99ef9c740ae",
"importer": "sprite-frame",
"rawTextureUuid": "8d9e57b1-563f-40b3-aaed-cd8d4e8c6255",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 217,
"height": 225,
"rawWidth": 217,
"rawHeight": 225,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/resources/manh_vun/6 copy.png
0 → 100644
View file @
206d1651
39.1 KB
assets/resources/manh_vun/6 copy.png.meta
0 → 100644
View file @
206d1651
{
"ver": "2.3.7",
"uuid": "163fa625-c63f-4ccd-bda2-e2ee8d4ab844",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 168,
"height": 310,
"platformSettings": {},
"subMetas": {
"6 copy": {
"ver": "1.0.6",
"uuid": "ae7ba715-3fca-4a44-94bb-b1d9c7d2286f",
"importer": "sprite-frame",
"rawTextureUuid": "163fa625-c63f-4ccd-bda2-e2ee8d4ab844",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 168,
"height": 310,
"rawWidth": 168,
"rawHeight": 310,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/scripts/GamePlay/BreakingBottleController.ts
View file @
206d1651
import
{
CHECK_FRAGMENT
,
CHECK_TOUCH
,
eventTarget
,
HAMMER
,
RESET_BOTTLE
,
RESET_FRAGMENT
,
SHOW_CARD_POPU
P
}
from
"../Events"
;
import
{
BEAT_GUILD
,
CHECK_FRAGMENT
,
CHECK_TOUCH
,
eventTarget
,
HAMMER
,
RESET_BOTTLE
,
RESET_FRAGMENT
,
SHOW_CARD_POPUP
,
STOP_GUILD_TA
P
}
from
"../Events"
;
import
{
Global
}
from
"../Global"
;
import
{
Global
}
from
"../Global"
;
import
FragmentController
from
"./FragmentController"
;
import
FragmentController
from
"./FragmentController"
;
import
TheController
from
"./TheController"
;
import
TheController
from
"./TheController"
;
...
@@ -33,11 +33,17 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -33,11 +33,17 @@ export default class BreakingBottleController extends cc.Component {
eventTarget
.
on
(
CHECK_FRAGMENT
,
this
.
checkFragment
,
this
);
eventTarget
.
on
(
CHECK_FRAGMENT
,
this
.
checkFragment
,
this
);
eventTarget
.
on
(
HAMMER
,
this
.
onHammer
,
this
);
eventTarget
.
on
(
HAMMER
,
this
.
onHammer
,
this
);
eventTarget
.
on
(
RESET_BOTTLE
,
this
.
resetBottle
,
this
);
eventTarget
.
on
(
RESET_BOTTLE
,
this
.
resetBottle
,
this
);
eventTarget
.
on
(
BEAT_GUILD
,
this
.
beatGuild
,
this
);
this
.
_fragmentsNode
=
this
.
getComponentsInChildren
(
FragmentController
).
map
(
item
=>
item
.
node
);
this
.
_fragmentsNode
=
this
.
getComponentsInChildren
(
FragmentController
).
map
(
item
=>
item
.
node
);
this
.
_fragmentsPosition
=
this
.
_fragmentsNode
.
map
(
item
=>
item
.
position
.
clone
());
this
.
_fragmentsPosition
=
this
.
_fragmentsNode
.
map
(
item
=>
item
.
position
.
clone
());
}
}
private
beatGuild
()
{
this
.
onHammer
(
cc
.
v2
(
100
));
}
protected
start
():
void
{
protected
start
():
void
{
this
.
hideHammer
();
this
.
hideHammer
();
}
}
...
@@ -54,10 +60,17 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -54,10 +60,17 @@ export default class BreakingBottleController extends cc.Component {
}
}
private
onHammer
(
newPos
:
cc
.
Vec2
)
{
private
onHammer
(
newPos
:
cc
.
Vec2
)
{
this
.
hammerNode
.
active
=
false
;
this
.
scheduleOnce
(()
=>
this
.
hammerNode
.
active
=
true
,
0
);
cc
.
Tween
.
stopAllByTarget
(
this
.
hammerNode
);
this
.
_spine
.
setAnimation
(
0
,
"Dap4"
,
false
);
cc
.
tween
(
this
.
hammerNode
)
cc
.
tween
(
this
.
hammerNode
)
.
to
(
0.1
,
{
opacity
:
255
,
position
:
cc
.
v3
(
newPos
.
x
,
newPos
.
y
),
active
:
true
})
.
to
(
0
,
{
opacity
:
255
,
position
:
cc
.
v3
(
newPos
.
x
,
newPos
.
y
,
0
),
active
:
false
})
.
delay
(
0.7
)
.
to
(
0
,
{
active
:
true
})
.
to
(
0.2
,
{
opacity
:
0
,
active
:
false
})
.
delay
(
1
)
.
to
(
0.5
,
{
position
:
cc
.
v3
(
300
)
})
.
start
();
.
start
();
}
}
...
@@ -69,6 +82,7 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -69,6 +82,7 @@ export default class BreakingBottleController extends cc.Component {
}
}
private
onTouchStart
(
event
:
cc
.
Event
.
EventTouch
)
{
private
onTouchStart
(
event
:
cc
.
Event
.
EventTouch
)
{
eventTarget
.
emit
(
STOP_GUILD_TAP
);
const
pos
=
event
.
getLocation
();
const
pos
=
event
.
getLocation
();
const
nodePos
=
this
.
node
.
convertToNodeSpaceAR
(
pos
);
const
nodePos
=
this
.
node
.
convertToNodeSpaceAR
(
pos
);
...
@@ -84,7 +98,8 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -84,7 +98,8 @@ export default class BreakingBottleController extends cc.Component {
}
}
private
hideHammer
()
{
private
hideHammer
()
{
this
.
hammerNode
.
opacity
=
0
;
// this.hammerNode.opacity = 0;
this
.
hammerNode
.
position
=
cc
.
v3
(
300
);
}
}
...
...
assets/scripts/Tutorial/TapTutorialController.ts
View file @
206d1651
...
@@ -10,7 +10,8 @@ export default class TapTutorialController extends cc.Component {
...
@@ -10,7 +10,8 @@ export default class TapTutorialController extends cc.Component {
[
this
.
_hand
]
=
this
.
node
.
children
;
[
this
.
_hand
]
=
this
.
node
.
children
;
eventTarget
.
on
(
STOP_GUILD_TAP
,
this
.
stopGuild
,
this
);
eventTarget
.
on
(
STOP_GUILD_TAP
,
this
.
stopGuild
,
this
);
this
.
tutorialTap
();
// this.tutorialTap();
this
.
tutorialTapForFragements
();
}
}
private
stopGuild
()
{
private
stopGuild
()
{
...
@@ -27,7 +28,22 @@ export default class TapTutorialController extends cc.Component {
...
@@ -27,7 +28,22 @@ export default class TapTutorialController extends cc.Component {
.
to
(
0.2
,
{
angle
:
-
15
})
.
to
(
0.2
,
{
angle
:
-
15
})
.
to
(
0.15
,
{
position
:
cc
.
v3
(
110
,
80
)
})
.
to
(
0.15
,
{
position
:
cc
.
v3
(
110
,
80
)
})
.
call
(()
=>
eventTarget
.
emit
(
BEAT_GUILD
))
.
call
(()
=>
eventTarget
.
emit
(
BEAT_GUILD
))
.
delay
(
0.8
)
.
delay
(
1
)
)
.
start
();
}
private
tutorialTapForFragements
()
{
this
.
_hand
.
active
=
true
;
cc
.
tween
(
this
.
_hand
)
.
repeatForever
(
cc
.
tween
(
this
.
_hand
)
.
to
(
0
,
{
position
:
cc
.
v3
(
120
,
100
),
opacity
:
255
})
.
to
(
0.2
,
{
angle
:
15
})
.
to
(
0.2
,
{
angle
:
-
15
})
.
to
(
0.15
,
{
position
:
cc
.
v3
(
110
,
80
)
})
.
call
(()
=>
eventTarget
.
emit
(
BEAT_GUILD
))
.
to
(
0.5
,
{
opacity
:
0
})
.
delay
(
2
)
)
)
.
start
();
.
start
();
}
}
...
...
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