-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "rotate fast" option to rotation targets and end state (#482)
- Loading branch information
1 parent
9939659
commit 6915208
Showing
45 changed files
with
485 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
class GoalEndState { | ||
num velocity; | ||
num rotation; | ||
bool rotateFast; | ||
|
||
GoalEndState({ | ||
this.velocity = 0, | ||
this.rotation = 0, | ||
this.rotateFast = false, | ||
}); | ||
|
||
GoalEndState.fromJson(Map<String, dynamic> json) | ||
: velocity = json['velocity'] ?? 0, | ||
rotation = json['rotation'] ?? 0; | ||
rotation = json['rotation'] ?? 0, | ||
rotateFast = json['rotateFast'] ?? false; | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'velocity': velocity, | ||
'rotation': rotation, | ||
'rotateFast': rotateFast, | ||
}; | ||
} | ||
|
||
GoalEndState clone() { | ||
return GoalEndState(velocity: velocity, rotation: rotation); | ||
return GoalEndState( | ||
velocity: velocity, rotation: rotation, rotateFast: rotateFast); | ||
} | ||
|
||
@override | ||
bool operator ==(Object other) => | ||
other is GoalEndState && | ||
other.runtimeType == runtimeType && | ||
other.velocity == velocity && | ||
other.rotation == rotation; | ||
other.rotation == rotation && | ||
other.rotateFast == rotateFast; | ||
|
||
@override | ||
int get hashCode => Object.hash(velocity, rotation); | ||
int get hashCode => Object.hash(velocity, rotation, rotateFast); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.