Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
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
abdullh.alsoleman
Front-End
Commits
6488a133
Commit
6488a133
authored
Oct 12, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds breakingForce argument to joints constructors in sprite physics
parent
37840863
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
physics_joint.dart
packages/flutter_sprites/lib/physics_joint.dart
+16
-9
No files found.
packages/flutter_sprites/lib/physics_joint.dart
View file @
6488a133
part of
skysprites
;
abstract
class
PhysicsJoint
{
PhysicsJoint
(
this
.
bodyA
,
this
.
bodyB
)
{
PhysicsJoint
(
this
.
bodyA
,
this
.
bodyB
,
this
.
breakingForce
)
{
bodyA
.
_joints
.
add
(
this
);
bodyB
.
_joints
.
add
(
this
);
}
...
...
@@ -67,8 +67,9 @@ class PhysicsJointRevolute extends PhysicsJoint {
this
.
worldAnchor
,
{
this
.
lowerAngle
:
0.0
,
this
.
upperAngle
:
0.0
,
this
.
enableLimit
:
false
})
:
super
(
bodyA
,
bodyB
)
{
this
.
enableLimit
:
false
,
double
breakingForce
})
:
super
(
bodyA
,
bodyB
,
breakingForce
)
{
_completeCreation
();
}
...
...
@@ -99,8 +100,10 @@ class PhysicsJointPrismatic extends PhysicsJoint {
PhysicsJointPrismatic
(
PhysicsBody
bodyA
,
PhysicsBody
bodyB
,
this
.
axis
)
:
super
(
bodyA
,
bodyB
)
{
this
.
axis
,
{
double
breakingForce
}
)
:
super
(
bodyA
,
bodyB
,
breakingForce
)
{
_completeCreation
();
}
...
...
@@ -116,8 +119,10 @@ class PhysicsJointPrismatic extends PhysicsJoint {
class
PhysicsJointWeld
extends
PhysicsJoint
{
PhysicsJointWeld
(
PhysicsBody
bodyA
,
PhysicsBody
bodyB
)
:
super
(
bodyA
,
bodyB
)
{
PhysicsBody
bodyB
,
{
double
breakingForce
}
)
:
super
(
bodyA
,
bodyB
,
breakingForce
)
{
_completeCreation
();
}
...
...
@@ -140,8 +145,10 @@ class PhysicsJointPulley extends PhysicsJoint {
this
.
groundAnchorB
,
this
.
anchorA
,
this
.
anchorB
,
this
.
ratio
)
:
super
(
bodyA
,
bodyB
)
{
this
.
ratio
,
{
double
breakingForce
}
)
:
super
(
bodyA
,
bodyB
,
breakingForce
)
{
_completeCreation
();
}
...
...
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