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
5ceadf6d
Commit
5ceadf6d
authored
Apr 01, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add hammer
parent
21489ab8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
193 additions
and
5 deletions
+193
-5
main.fire
assets/main.fire
+189
-3
FragmentController.ts
assets/scripts/GamePlay/FragmentController.ts
+1
-2
BreakingBottleScreen.ts
assets/scripts/UI/BreakingBottleScreen.ts
+3
-0
No files found.
assets/main.fire
View file @
5ceadf6d
...
...
@@ -99,10 +99,10 @@
"_active": true,
"_components": [
{
"__id__": 1
76
"__id__": 1
80
},
{
"__id__": 1
77
"__id__": 1
81
}
],
"_prefab": null,
...
...
@@ -5144,12 +5144,15 @@
},
{
"__id__": 172
},
{
"__id__": 175
}
],
"_active": true,
"_components": [
{
"__id__": 17
5
"__id__": 17
9
}
],
"_prefab": null,
...
...
@@ -8266,6 +8269,186 @@
},
"_id": "55p7kNBX9GUKwcKmGcqJ9A"
},
{
"__type__": "cc.Node",
"_name": "Hammer",
"_objFlags": 0,
"_parent": {
"__id__": 110
},
"_children": [
{
"__id__": 176
}
],
"_active": true,
"_components": [
{
"__id__": 178
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 600
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_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": "ecEAZtsQ1M86ZSI5xa+HtN"
},
{
"__type__": "cc.Node",
"_name": "Bua",
"_objFlags": 0,
"_parent": {
"__id__": 175
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 177
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 462.01,
"height": 540.78
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
200,
-150,
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": "eb8hbSoSxMx7ZXOGQBwKBk"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 176
},
"_enabled": true,
"_materials": [
{
"__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3"
}
],
"paused": false,
"defaultSkin": "Bua",
"defaultAnimation": "Dap4",
"_preCacheMode": 0,
"_cacheMode": 0,
"loop": true,
"premultipliedAlpha": true,
"timeScale": 1,
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_skeletonCache": null,
"_animationName": "Dap4",
"_animationQueue": [],
"_headAniInfo": null,
"_playTimes": 0,
"_isAniComplete": true,
"_N$skeletonData": {
"__uuid__": "a5d5b5a3-7ac9-4207-a35a-9fd1ce088b83"
},
"_N$_defaultCacheMode": 0,
"_N$debugSlots": false,
"_N$debugBones": false,
"_N$debugMesh": false,
"_N$useTint": false,
"_N$enableBatch": false,
"_id": "0dlMrbSXxJU6Vbpc+nVqiW"
},
{
"__type__": "fa954JGo2FPTIS/o0ccP3kC",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 175
},
"_enabled": true,
"_id": "9a4ytEMJlKtKZ1ogOoLQA/"
},
{
"__type__": "90267gmddZPkLBW/eIiYJR6",
"_name": "",
...
...
@@ -8277,6 +8460,9 @@
"spriteNode": {
"__id__": 167
},
"hammerNode": {
"__id__": 175
},
"_id": "4eyUw4PwxKSq63DGUgJory"
},
{
...
...
assets/scripts/GamePlay/FragmentController.ts
View file @
5ceadf6d
...
...
@@ -15,7 +15,6 @@ export default class FragmentController extends cc.Component {
this
.
_physicsCollider
=
this
.
node
.
getComponent
(
cc
.
PhysicsPolygonCollider
);
this
.
_physicsCollider
.
points
=
this
.
_collider
.
points
;
this
.
_physicsCollider
.
enabled
=
false
;
this
.
_rg
=
this
.
node
.
getComponent
(
cc
.
RigidBody
);
eventTarget
.
on
(
CHECK_TOUCH
,
this
.
checkTouch
,
this
);
...
...
@@ -39,7 +38,7 @@ export default class FragmentController extends cc.Component {
.
call
(()
=>
{
this
.
_physicsCollider
.
enabled
=
true
;
this
.
_rg
.
type
=
cc
.
RigidBodyType
.
Dynamic
;
this
.
_rg
.
gravityScale
=
2
;
this
.
_rg
.
gravityScale
=
5
;
})
.
start
();
}
...
...
assets/scripts/UI/BreakingBottleScreen.ts
View file @
5ceadf6d
...
...
@@ -8,6 +8,8 @@ export default class BreakingBottleScreen extends cc.Component {
@
property
(
cc
.
Node
)
private
spriteNode
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
private
hammerNode
:
cc
.
Node
=
null
;
onLoad
()
{
cc
.
director
.
getPhysicsManager
().
enabled
=
true
;
...
...
@@ -22,6 +24,7 @@ export default class BreakingBottleScreen extends cc.Component {
this
.
spriteNode
.
position
=
cc
.
v3
(
nodePos
.
x
,
nodePos
.
y
);
eventTarget
.
emit
(
CHECK_TOUCH
,
nodePos
);
this
.
hammerNode
.
position
=
cc
.
v3
(
nodePos
.
x
,
nodePos
.
y
);
}
}
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