mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
Switches to named arguments in sprite constraints
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user