exp-ecs icon indicating copy to clipboard operation
exp-ecs copied to clipboard

Built-in mechanism to reference other entity/component in a component

Open kevinresol opened this issue 5 years ago • 0 comments

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

kevinresol avatar Apr 21 '20 15:04 kevinresol