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
f4eee2d3
Commit
f4eee2d3
authored
Apr 02, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug fragments 6, 3
parent
328daa85
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
main.fire
assets/main.fire
+2
-2
BreakingBottleController.ts
assets/scripts/GamePlay/BreakingBottleController.ts
+6
-4
No files found.
assets/main.fire
View file @
f4eee2d3
...
@@ -735,8 +735,8 @@
...
@@ -735,8 +735,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width":
5
00,
"width":
8
00,
"height":
5
00
"height":
8
00
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
...
assets/scripts/GamePlay/BreakingBottleController.ts
View file @
f4eee2d3
...
@@ -21,6 +21,10 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -21,6 +21,10 @@ export default class BreakingBottleController extends cc.Component {
onLoad
()
{
onLoad
()
{
cc
.
director
.
getPhysicsManager
().
enabled
=
true
;
cc
.
director
.
getPhysicsManager
().
enabled
=
true
;
// cc.director.getPhysicsManager().debugDrawFlags = cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.PhysicsManager.DrawBits.e_jointBit |
// cc.PhysicsManager.DrawBits.e_shapeBit;
this
.
_spine
=
this
.
hammerNode
.
getComponentInChildren
(
sp
.
Skeleton
);
this
.
_spine
=
this
.
hammerNode
.
getComponentInChildren
(
sp
.
Skeleton
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
...
@@ -31,8 +35,6 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -31,8 +35,6 @@ export default class BreakingBottleController extends cc.Component {
eventTarget
.
on
(
RESET_BOTTLE
,
this
.
resetBottle
,
this
);
eventTarget
.
on
(
RESET_BOTTLE
,
this
.
resetBottle
,
this
);
this
.
_fragmentsNode
=
this
.
getComponentsInChildren
(
FragmentController
).
map
(
item
=>
item
.
node
);
this
.
_fragmentsNode
=
this
.
getComponentsInChildren
(
FragmentController
).
map
(
item
=>
item
.
node
);
console
.
log
(
'this._fragmentsAll'
,
this
.
_fragmentsNode
)
this
.
_fragmentsPosition
=
this
.
_fragmentsNode
.
map
(
item
=>
item
.
position
.
clone
());
this
.
_fragmentsPosition
=
this
.
_fragmentsNode
.
map
(
item
=>
item
.
position
.
clone
());
}
}
...
@@ -53,9 +55,9 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -53,9 +55,9 @@ export default class BreakingBottleController extends cc.Component {
private
onHammer
(
newPos
:
cc
.
Vec2
)
{
private
onHammer
(
newPos
:
cc
.
Vec2
)
{
cc
.
tween
(
this
.
hammerNode
)
cc
.
tween
(
this
.
hammerNode
)
.
to
(
0.1
,
{
opacity
:
255
,
position
:
cc
.
v3
(
newPos
.
x
,
newPos
.
y
)
})
.
to
(
0.1
,
{
opacity
:
255
,
position
:
cc
.
v3
(
newPos
.
x
,
newPos
.
y
)
,
active
:
true
})
.
delay
(
0.7
)
.
delay
(
0.7
)
.
to
(
0.2
,
{
opacity
:
0
})
.
to
(
0.2
,
{
opacity
:
0
,
active
:
false
})
.
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