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

Side by Side Diff: sky/examples/game/lib/game_demo_box.dart

Issue 1187153002: Places demo game in a OneChildRenderObjectWrapper and adds a star field and nebula for background (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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/examples/game/lib/game_demo_world.dart » ('j') | sky/examples/game/main.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of game; 1 part of game;
2 2
3 const double _steeringThreshold = 0.0; 3 const double _steeringThreshold = 0.0;
4 const double _steeringMax = 150.0; 4 const double _steeringMax = 150.0;
5 5
6 class GameDemoBox extends SpriteBox { 6 class GameDemoBox extends SpriteBox {
7 7
8 GameDemoBox(GameDemoWorld game) : super(game, SpriteBoxTransformMode.letterbox ); 8 GameDemoBox(GameDemoWorld game) : super(game, SpriteBoxTransformMode.letterbox );
9 9
10 GameDemoWorld get _gameWorld => this.rootNode; 10 GameDemoWorld get _gameWorld => this.rootNode;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 case 'pointerup': 61 case 'pointerup':
62 case 'pointercancel': 62 case 'pointercancel':
63 if (pointer == _firstPointer) { 63 if (pointer == _firstPointer) {
64 // Un-assign the first pointer 64 // Un-assign the first pointer
65 _firstPointer = -1; 65 _firstPointer = -1;
66 _firstPointerDownPos = null; 66 _firstPointerDownPos = null;
67 _gameWorld.controlSteering(0.0, 0.0); 67 _gameWorld.controlSteering(0.0, 0.0);
68 } 68 }
69 else if (pointer == _secondPointer) { 69 else if (pointer == _secondPointer) {
70 _secondPointer = -1; 70 _secondPointer = -1;
71 _gameWorld.controlFire();
72 } 71 }
73 break; 72 break;
74 default: 73 default:
75 break; 74 break;
76 } 75 }
77 } 76 }
78 } 77 }
79 78
80 } 79 }
OLDNEW
« no previous file with comments | « no previous file | sky/examples/game/lib/game_demo_world.dart » ('j') | sky/examples/game/main.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698