Browse Source

Rename EntityStructBuilder to EntityViewStructBuilder

tags/Rel2b
sebas77 6 years ago
parent
commit
f8b7b59307
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      Svelto.ECS/ECS/EntityViewBuilder.cs

+ 4
- 4
Svelto.ECS/ECS/EntityViewBuilder.cs View File

@@ -54,19 +54,19 @@ namespace Svelto.ECS
readonly Type _entityViewType = typeof(EntityViewType);
}

public class EntityStructBuilder<EntityViewType> : IEntityViewBuilder where EntityViewType : struct, IEntityStruct
public class EntityViewStructBuilder<EntityViewType> : IEntityViewBuilder where EntityViewType : struct, IEntityStruct
{
public void BuildEntityViewAndAddToList(ref ITypeSafeList list, int entityID, out IEntityView entityView)
{
var lentityView = default(EntityViewType);
lentityView.ID = entityID;
var structEntityView = default(EntityViewType);
structEntityView.ID = entityID;
if (list == null)
list = new TypeSafeFasterListForECSForStructs<EntityViewType>();

var castedList = list as TypeSafeFasterListForECSForStructs<EntityViewType>;

castedList.Add(lentityView);
castedList.Add(structEntityView);

entityView = null;
}


Loading…
Cancel
Save