Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Unified Diff: sky/sdk/example/game/lib/action.dart

Issue 1226113007: Add @override annotation to known overriden methods (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/example/fitness/lib/settings.dart ('k') | sky/sdk/example/game/lib/game_demo_world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/game/lib/action.dart
diff --git a/sky/sdk/example/game/lib/action.dart b/sky/sdk/example/game/lib/action.dart
index 0c6119d528a3937a7b938b18fba62953699ac465..5a257d95ebd8ff57cb74e08d1cc61b0af3692146 100644
--- a/sky/sdk/example/game/lib/action.dart
+++ b/sky/sdk/example/game/lib/action.dart
@@ -19,10 +19,12 @@ abstract class ActionInterval extends Action {
bool _firstTick = true;
double _elapsed = 0.0;
+ @override
double get duration => _duration;
ActionInterval([this._duration = 0.0]);
+ @override
void step(double dt) {
if (_firstTick) {
_firstTick = false;
@@ -51,6 +53,7 @@ class ActionRepeat extends ActionInterval {
_duration = action.duration * numRepeats;
}
+ @override
void update(double t) {
action.update((t * numRepeats.toDouble()) % numRepeats.toDouble());
}
@@ -82,6 +85,7 @@ class ActionSequence extends ActionInterval {
}
}
+ @override
void update(double t) {
if (t < _split) {
// Play first action
@@ -112,9 +116,11 @@ class ActionSequence extends ActionInterval {
abstract class ActionInstant extends Action {
+ @override
void step(double dt) {
}
+ @override
void update(double t) {
fire();
_finished = true;
@@ -128,6 +134,7 @@ class ActionCallFunction extends ActionInstant {
ActionCallFunction(this._function);
+ @override
void fire() {
_function();
}
@@ -138,6 +145,7 @@ class ActionRemoveNode extends ActionInstant {
ActionRemoveNode(this._node);
+ @override
void fire() {
_node.removeFromParent();
}
@@ -149,6 +157,7 @@ class ActionRepeatForever extends Action {
ActionRepeatForever(this.action);
+ @override
step(double dt) {
_elapsedInAction += dt;
while (_elapsedInAction > action.duration) {
@@ -198,6 +207,7 @@ class ActionTween extends ActionInterval {
}
}
+ @override
void update(double t) {
var newVal;
« no previous file with comments | « sky/sdk/example/fitness/lib/settings.dart ('k') | sky/sdk/example/game/lib/game_demo_world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698