mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-10-31 08:56:01 +08:00 
			
		
		
		
	 ef7427941c
			
		
	
	ef7427941c
	
	
	
		
			
			* Possibility to change component priority * Fix formatting * Posibility to change priority * Docs for priority change * Priority example * Add section explaining priority * Update doc/game.md Co-authored-by: Erick <erickzanardoo@gmail.com> * Update examples/lib/stories/components/components.dart Co-authored-by: Erick <erickzanardoo@gmail.com> * No null priorities in the super call chain * Possibility to wait for all children to be loaded * Test for addChildren * Introduce parent to Component * Check whether parent is BaseComponent Co-authored-by: Erick <erickzanardoo@gmail.com>
		
			
				
	
	
		
			33 lines
		
	
	
		
			826 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			826 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
| import 'package:dashbook/dashbook.dart';
 | |
| import 'package:flame/game.dart';
 | |
| 
 | |
| import '../../commons/commons.dart';
 | |
| import 'composability.dart';
 | |
| import 'debug.dart';
 | |
| import 'priority.dart';
 | |
| 
 | |
| const priorityInfo = '''
 | |
| On this example, click on the square to bring them to the front by changing the
 | |
| priority.
 | |
| ''';
 | |
| 
 | |
| void addComponentsStories(Dashbook dashbook) {
 | |
|   dashbook.storiesOf('Components')
 | |
|     ..add(
 | |
|       'Composability',
 | |
|       (_) => GameWidget(game: Composability()),
 | |
|       codeLink: baseLink('components/composability.dart'),
 | |
|     )
 | |
|     ..add(
 | |
|       'Priority',
 | |
|       (_) => GameWidget(game: Priority()),
 | |
|       codeLink: baseLink('components/priority.dart'),
 | |
|       info: priorityInfo,
 | |
|     )
 | |
|     ..add(
 | |
|       'Debug',
 | |
|       (_) => GameWidget(game: DebugGame()),
 | |
|       codeLink: baseLink('components/debug.dart'),
 | |
|     );
 | |
| }
 |