Example #1
0
        public ushort AttachComponent <T>(ECS.Entity e, ComponentList <T> list)
        {
            ushort posComponent = componentListIndices[typeof(T)];

            e.components[posComponent] = list.NewItem(e);

            return((ushort)e.components[posComponent]);
        }
Example #2
0
        public ECS.Entity NewEntity()
        {
            ECS.Entity e = new ECS.Entity(lastEntity++, (ushort)componentListIndices.Count);

            return(e);
        }