Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt10_tydh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
ngt10_tydh
Commits
50fda7d2
Commit
50fda7d2
authored
Oct 10, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改box2d的用法
parent
f14aad3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
box2d.ts
assets/cocos_generator/scene/box2d.ts
+6
-3
tsconfig.json
tsconfig.json
+0
-1
No files found.
assets/cocos_generator/scene/box2d.ts
View file @
50fda7d2
...
@@ -41,9 +41,12 @@ export default class NewClass extends cc.Component {
...
@@ -41,9 +41,12 @@ export default class NewClass extends cc.Component {
cc
.
PhysicsManager
.
POSITION_ITERATIONS
=
8
;
cc
.
PhysicsManager
.
POSITION_ITERATIONS
=
8
;
setTimeout
(()
=>
{
let
item
=
this
.
node
.
getChildByName
(
"
item2
"
)
let
item
=
this
.
node
.
getChildByName
(
"
item2
"
)
let
rigid
=
item
.
getComponent
(
cc
.
RigidBody
)
let
rigid
=
item
.
getComponent
(
cc
.
RigidBody
)
rigid
.
applyLinearImpulse
(
cc
.
v2
(
1000
,
10000
),
rigid
.
getWorldCenter
(),
true
)
rigid
.
linearVelocity
=
cc
.
v2
(
-
100
,
0
)
},
1500
);
// rigid.applyLinearImpulse(cc.v2(1000, 10000), rigid.getWorldCenter(), true)
// setTimeout(() => {
// setTimeout(() => {
// let item = this.node.getChildByName("item2")
// let item = this.node.getChildByName("item2")
...
...
tsconfig.json
View file @
50fda7d2
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
"experimentalDecorators"
:
true
,
"experimentalDecorators"
:
true
,
"skipLibCheck"
:
true
,
"skipLibCheck"
:
true
,
"outDir"
:
"temp/vscode-dist"
,
"outDir"
:
"temp/vscode-dist"
,
"allowJs"
:
true
,
"forceConsistentCasingInFileNames"
:
true
"forceConsistentCasingInFileNames"
:
true
},
},
"exclude"
:
[
"exclude"
:
[
...
...
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