Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Id and Entity extension generator #74

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

BeanCheeseBurrito
Copy link
Owner

This PR implements code generators for adding entity/id method extensions to Alert , Component , Observer , Pipeline , System, TimerEntity , and UntypedComponent . Previously, accessing entity and id methods had to be done through the .Entity and .Id properties.

world.Component<Phases.Render>().Entity
    .Add(Ecs.Phase)
    .DependsOn(Ecs.OnUpdate);

Now entity and id methods can be accessed directly from entity-based objects.

world.Component<Phases.Render>()
    .Add(Ecs.Phase)
    .DependsOn(Ecs.OnUpdate);

Tests and examples have been updated to use the short-form versions.

@BeanCheeseBurrito BeanCheeseBurrito merged commit 91fbb01 into main Nov 18, 2024
3 checks passed
@BeanCheeseBurrito BeanCheeseBurrito deleted the entity-extension-generator branch November 18, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant