Exemple #1
0
        public void Initialize <TC0>(uint id, TC0 component0) where TC0 : class, IEcsComponent, new()
        {
            Id = id;

            byte index0 = EcsComponentType <TC0> .Index;

            _archetype = _archetypeManager.FindOrCreateArchetype(index0);
            _archetype.AddComponent(index0, component0);
            _archetype.AddEntity(this);
        }