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

Unified Diff: sky/sdk/example/game/lib/game_demo_world.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/game/lib/action.dart ('k') | sky/sdk/example/game/lib/node_with_size.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/game/lib/game_demo_world.dart
diff --git a/sky/sdk/example/game/lib/game_demo_world.dart b/sky/sdk/example/game/lib/game_demo_world.dart
index 2110689fcba68082c569bcf00a13bf9ced381819..0ac4a40dffded24aca0b0bd1836fefcca40af0f4 100644
--- a/sky/sdk/example/game/lib/game_demo_world.dart
+++ b/sky/sdk/example/game/lib/game_demo_world.dart
@@ -47,7 +47,7 @@ class GameDemoWorld extends NodeWithSize {
// Game state
int _numFrames = 0;
bool _isGameOver = false;
-
+
GameDemoWorld(this._app, ImageMap images, this._spriteSheet) : super(new Size(_gameSizeWidth, _gameSizeHeight)) {
// Fetch images
@@ -86,7 +86,7 @@ class GameDemoWorld extends NodeWithSize {
}
// Methods for adding game objects
-
+
void addAsteroid(AsteroidSize size, [Point pos]) {
Asteroid asteroid = new Asteroid(_spriteSheet, size);
asteroid.zPosition = 1.0;
@@ -204,6 +204,7 @@ class GameDemoWorld extends NodeWithSize {
_gameLayer.addChild(explosionNode);
}
+ @override
void update(double dt) {
// Move asteroids
for (Asteroid asteroid in _asteroids) {
@@ -347,6 +348,7 @@ class GameDemoWorld extends NodeWithSize {
int _secondPointer = -1;
Point _firstPointerDownPos;
+ @override
bool handleEvent(SpriteBoxEvent event) {
Point pointerPos = convertPointToNodeSpace(event.boxPosition);
@@ -454,6 +456,7 @@ class Asteroid extends Sprite {
actions.run(repeat);
}
+ @override
bool handleEvent(SpriteBoxEvent event) {
if (event.type == "pointerdown") {
actions.stopWithTag("fade");
« no previous file with comments | « sky/sdk/example/game/lib/action.dart ('k') | sky/sdk/example/game/lib/node_with_size.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698