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

Entity ambiguous call #29

Open
sent44 opened this issue Jan 18, 2025 · 0 comments
Open

Entity ambiguous call #29

sent44 opened this issue Jan 18, 2025 · 0 comments

Comments

@sent44
Copy link

sent44 commented Jan 18, 2025

In v0.4.0

common.add(entity: EntityRef, componentList: varargs[typed])
common.add(entity: EntityRef, component`gensym107: ComponentTypeClass)

common.fetch(entity: EntityRef, components`gensym88: varargs[typed])
common.fetch(entity: EntityRef, component`gensym88: typedesc)

Workaround when add single component , pass with type; Cannot add with initialize value. When fetch single component, must pass object; I think this is bad to performance.

Remove these should work. I don't know other place that might have this ambiguous function.

template add*(`entity`: EntityRef, component: ComponentTypeclass) =
`entity`.addComponent component

template fetch*(`entity`: EntityRef, component: typedesc): auto =
fetchComponent(`entity`, component)

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

No branches or pull requests

1 participant