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

Unified Diff: sky/examples/game/lib/game_demo_world.dart

Issue 1197493002: Adds a SpriteWidget and simplifies sample game setup (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
Index: sky/examples/game/lib/game_demo_world.dart
diff --git a/sky/examples/game/lib/game_demo_world.dart b/sky/examples/game/lib/game_demo_world.dart
index 82094d5b2b4fdb441863c84d8adfce5a91c33616..ce57d7084ef5dc2d7d8d1e1bd9903e6adb257c17 100644
--- a/sky/examples/game/lib/game_demo_world.dart
+++ b/sky/examples/game/lib/game_demo_world.dart
@@ -1,5 +1,8 @@
part of game;
+const double _steeringThreshold = 0.0;
+const double _steeringMax = 150.0;
+
// Random generator
Math.Random _rand = new Math.Random();
@@ -357,7 +360,7 @@ class Laser extends Sprite {
_movementVector = new Point(_movementVector.x + ship._movementVector[0], _movementVector.y + ship._movementVector[1]);
}
- bool move() {
+ void move() {
position = pointAdd(position, _movementVector);
_frameCount++;
}

Powered by Google App Engine
This is Rietveld 408576698