Skip to content

Entity ambiguous call #29

@sent44

Description

@sent44

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions