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

Annotations for the Fledge ECS framework. Used with fledge_ecs_generator for code generation.

fledge_ecs_annotations #

Annotations for the Fledge ECS framework. Used with fledge_ecs_generator for code generation.

Installation #

dependencies:
  fledge_ecs_annotations: ^0.1.0

Usage #

This package provides annotations used by the Fledge code generator to create boilerplate code for your ECS components and systems.

Available Annotations #

import 'package:fledge_ecs_annotations/fledge_ecs_annotations.dart';

// Mark a class as a component
@component
class Position {
  double x;
  double y;
}

// Mark a function as a system
@system
void moveEntities(Query<(Position, Velocity)> query, Res<Time> time) {
  for (final (pos, vel) in query.iter()) {
    pos.x += vel.x * time.value.delta;
    pos.y += vel.y * time.value.delta;
  }
}

License #

Apache 2.0 - See LICENSE for details.

0
likes
160
points
482
downloads

Publisher

verified publisherfledge-framework.dev

Weekly Downloads

Annotations for the Fledge ECS framework. Used with fledge_ecs_generator for code generation.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#ecs #game-engine #game-development #annotations

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on fledge_ecs_annotations