Exemple #1
0
    public T GetComponent <T>() where T : new()
    {
        int   component_type = IEntityComponent.GetComponentID <T>();
        ulong ptr            = WComponent(handle, component_type, 3);
        T     result         = new T();

        ((InternalObject)(object)result).SetHandle(ptr);
        return(result);
    }
Exemple #2
0
    public void AddComponent <T>()
    {
        int component_type = IEntityComponent.GetComponentID <T>();

        WComponent(handle, component_type, 1);
    }
Exemple #3
0
    public void RemoveComponent <T>()
    {
        int component_type = IEntityComponent.GetComponentID <T>();

        WComponent(handle, component_type, 2);
    }