dartemis_builder 0.1.0 copy "dartemis_builder: ^0.1.0" to clipboard
dartemis_builder: ^0.1.0 copied to clipboard

outdated

A builder for use with dartemis to generate code that initializes EntitySystems and Managers.

dartemis_builder #

A builder for dartemis to create the code necessary to initialize Managers, Mappers and EntitySystems.

Usage #

Add the part statement to your library and the @Generate annotation on a Manager or EntitySystem and run build_runner.

part 'filename.g.part';

@Generate(EntityProcessingSystem, allOf: [Velocity, Position])
class SimpleMovementSystem extends _$SimpleMovementSystem {
  @override
  void processEntity(Entity entity) {
    final velocity = velocityMapper[entity];
    positionMapper[entity]
      ..x += velocity.x * world.delta
      ..y += velocity.y * world.delta;
  }
}

A live template for systems and managers in WebStorm can be useful, for example:

@Generate($BASE_SYSTEM$)
class $CLASS_NAME$System extends _$$$CLASS_NAME$System {
}

And for the part-part:

part '$filename$.g.dart';

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1
likes
0
pub points
6%
popularity

Publisher

unverified uploader

A builder for use with dartemis to generate code that initializes EntitySystems and Managers.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, build, build_config, dartemis, source_gen

More

Packages that depend on dartemis_builder