exp-ecs
exp-ecs copied to clipboard
Built-in mechanism to reference other entity/component in a component
class TurretTarget extends Component {
var target:Entity;
@:of(target) var position:Position;
}
Macro will transform position into var(default, null) and generate setters for target to populate position.
I think this approach would also benefit serializers, as they only need to store the entity reference