Example #1
0
        /// <summary>
        /// Add an entity part to an entity. If the part doesn't have an Id yet, a new Id will be assigned.
        /// </summary>
        public void AddPart(long entityId, EcsEntityPart part)
        {
            if (part.Id == 0L)
            {
                part.Id = NewId();
            }

            _entityIdsToEntityParts[entityId].Add(part);
        }
Example #2
0
 public void RemovePart(long entityId, EcsEntityPart part)
 {
     _entityIdsToEntityParts[entityId].Remove(part);
 }