fledge_ecs_generator 0.1.10 copy "fledge_ecs_generator: ^0.1.10" to clipboard
fledge_ecs_generator: ^0.1.10 copied to clipboard

Code generator for the Fledge ECS framework. Generates component registration and system wrappers.

example/example.dart

// Example usage of fledge_ecs_generator
//
// 1. Add annotations to your code:
//
// ```dart
// import 'package:fledge_ecs_annotations/fledge_ecs_annotations.dart';
//
// part 'my_game.g.dart';
//
// @component
// class Position {
//   double x, y;
//   Position(this.x, this.y);
// }
//
// @system
// void moveEntities(Query<(Position, Velocity)> query) {
//   for (final (pos, vel) in query.iter()) {
//     pos.x += vel.x;
//   }
// }
// ```
//
// 2. Run the generator:
//
// ```bash
// dart run build_runner build
// ```
//
// 3. Use the generated plugin:
//
// ```dart
// import 'my_game.g.dart';
//
// void main() {
//   final app = App()
//     ..addPlugin(GeneratedPlugin());
// }
// ```

void main() {
  print('fledge_ecs_generator is a build_runner generator.');
  print('See the package README for usage instructions.');
}
0
likes
160
points
383
downloads

Publisher

verified publisherfledge-framework.dev

Weekly Downloads

Code generator for the Fledge ECS framework. Generates component registration and system wrappers.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#ecs #code-generation #build-runner #game-development

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

analyzer, build, fledge_ecs_annotations, source_gen

More

Packages that depend on fledge_ecs_generator