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

Unified Diff: sky/sdk/lib/animation/mechanics.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/lib/animation/generators.dart ('k') | sky/sdk/lib/animation/scroll_behavior.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/animation/mechanics.dart
diff --git a/sky/sdk/lib/animation/mechanics.dart b/sky/sdk/lib/animation/mechanics.dart
index 6a6cc4cad46f7f8c744afe9cd8ac06757e5ba1a8..664c29debc330ee3ec54ba913230dc816360ac0f 100644
--- a/sky/sdk/lib/animation/mechanics.dart
+++ b/sky/sdk/lib/animation/mechanics.dart
@@ -21,6 +21,7 @@ class Particle extends System {
velocity += impulse / mass;
}
+ @override
void update(double deltaT) {
position += velocity * deltaT;
}
@@ -44,6 +45,7 @@ class ClosedBox extends Box {
assert(min == null || max == null || min <= max);
}
+ @override
void confine(Particle p) {
if (min != null) {
p.position = math.max(min, p.position);
@@ -69,6 +71,7 @@ class GeofenceBox extends Box {
assert(onEscape != null);
}
+ @override
void confine(Particle p) {
if (((min != null) && (p.position < min)) ||
((max != null) && (p.position > max)))
@@ -84,6 +87,7 @@ class ParticleInBox extends System {
box.confine(particle);
}
+ @override
void update(double deltaT) {
particle.update(deltaT);
box.confine(particle);
@@ -100,6 +104,7 @@ class ParticleInBoxWithFriction extends ParticleInBox {
: super(particle: particle, box: box),
_sign = particle.velocity.sign;
+ @override
void update(double deltaT) {
double force = -_sign * friction * particle.mass * -kGravity;
particle.applyImpulse(force * deltaT);
@@ -130,6 +135,7 @@ class ParticleAndSpringInBox extends System {
_applyInvariants();
}
+ @override
void update(double deltaT) {
particle.applyImpulse(spring.force * deltaT);
particle.update(deltaT);
@@ -181,6 +187,7 @@ class ParticleClimbingRamp extends System {
box.confine(particle);
}
+ @override
void update(double deltaT) {
particle.update(deltaT);
// Note that we apply the impulse from gravity after updating the particle's
@@ -202,6 +209,7 @@ class Multisystem extends System {
_currentSystem = system;
}
+ @override
void update(double deltaT) {
_currentSystem.update(deltaT);
}
« no previous file with comments | « sky/sdk/lib/animation/generators.dart ('k') | sky/sdk/lib/animation/scroll_behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698