Switches to named arguments in sprite constraints

This commit is contained in:
Viktor Lidholt
2015-08-26 10:07:24 -07:00
parent 68c7aa141b
commit 0a1dbbd64f
+2 -2
View File
@@ -20,7 +20,7 @@ double _dampenRotation(double src, double dst, double dampening) {
}
class ConstraintRotationToMovement extends Constraint {
ConstraintRotationToMovement([this.baseRotation = 0.0, this.dampening]);
ConstraintRotationToMovement({this.baseRotation: 0.0, this.dampening});
final double dampening;
final double baseRotation;
@@ -44,7 +44,7 @@ class ConstraintRotationToMovement extends Constraint {
}
class ConstraintRotationToNode extends Constraint {
ConstraintRotationToNode(this.targetNode, [this.baseRotation, this.dampening]);
ConstraintRotationToNode(this.targetNode, {this.baseRotation: 0.0, this.dampening});
final Node targetNode;
final double baseRotation;