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
7468ecbc
Commit
7468ecbc
authored
Apr 28, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix hammer , collider fragment
parent
99f7e199
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
177 additions
and
137 deletions
+177
-137
main.fire
assets/main.fire
+176
-136
BreakingBottleController.ts
assets/scripts/GamePlay/BreakingBottleController.ts
+1
-0
FragmentJarController.ts
assets/scripts/GamePlay/FragmentJarController.ts
+0
-1
No files found.
assets/main.fire
View file @
7468ecbc
This diff is collapsed.
Click to expand it.
assets/scripts/GamePlay/BreakingBottleController.ts
View file @
7468ecbc
...
@@ -21,6 +21,7 @@ export default class BreakingBottleController extends cc.Component {
...
@@ -21,6 +21,7 @@ export default class BreakingBottleController extends cc.Component {
onLoad
()
{
onLoad
()
{
return
;
cc
.
director
.
getPhysicsManager
().
enabled
=
true
;
cc
.
director
.
getPhysicsManager
().
enabled
=
true
;
// cc.director.getPhysicsManager().debugDrawFlags = cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.director.getPhysicsManager().debugDrawFlags = cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.PhysicsManager.DrawBits.e_jointBit |
// cc.PhysicsManager.DrawBits.e_jointBit |
...
...
assets/scripts/GamePlay/FragmentJarController.ts
View file @
7468ecbc
...
@@ -54,7 +54,6 @@ export default class FragmentJarController extends cc.Component {
...
@@ -54,7 +54,6 @@ export default class FragmentJarController extends cc.Component {
if
(
this
.
_physicsColliderFragmentLink
)
{
if
(
this
.
_physicsColliderFragmentLink
)
{
const
posFragmentLink
=
point
.
clone
().
subtract
(
cc
.
v2
(
this
.
fragmentLink
.
position
.
x
,
this
.
fragmentLink
.
position
.
y
));
const
posFragmentLink
=
point
.
clone
().
subtract
(
cc
.
v2
(
this
.
fragmentLink
.
position
.
x
,
this
.
fragmentLink
.
position
.
y
));
isInsideFragmentLink
=
cc
.
Intersection
.
pointInPolygon
(
posFragmentLink
,
this
.
_physicsColliderFragmentLink
.
points
);
isInsideFragmentLink
=
cc
.
Intersection
.
pointInPolygon
(
posFragmentLink
,
this
.
_physicsColliderFragmentLink
.
points
);
console
.
log
(
'isInside'
,
isInside
,
isInsideFragmentLink
,
this
.
node
.
name
,
this
.
_physicsColliderFragmentLink
.
points
.
length
)
}
}
if
(
!
isInside
&&
!
isInsideFragmentLink
)
{
if
(
!
isInside
&&
!
isInsideFragmentLink
)
{
...
...
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