public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { wrapper.AddComponentData(entity, new Parent { Value = m_parentEntity }); wrapper.AddComponentData(entity, new LocalToParent()); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { var buffer = wrapper.AddBuffer <T>(entity); foreach (var item in m_elements) { buffer.Add(item); } }
public EntityBuilder SetVariable <T>(T variable) where T : class, IEntityVariable { if (variables == null) { variables = new EntityVariableMap(); } variables.Set(variable); return(this); }
public TChild SetVariable <T>(T variable) where T : class, IEntityVariable { if (m_variables == null) { m_variables = new EntityVariableMap(); } m_variables.Set(variable); return((TChild)this); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, ref EntityBuilderData data) { if (m_callback != null) { m_callback?.Invoke(wrapper); } else { var buffer = wrapper.AddBuffer <T>(data.entity); if (m_elements != null) { foreach (var element in m_elements) { buffer.Add(element); } } } }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, ref EntityBuilderData data) { data.entity = wrapper.CreateEntity(GetEntityArchetype(wrapper)); wrapper.SetName(data.entity, typeof(T).Name + " " + data.entity.Index); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { wrapper.SetComponentData(entity, new Translation { Value = m_position }); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { wrapper.AddComponent <T>(entity); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, ref EntityBuilderData data) { wrapper.AddSharedComponentData(data.entity, m_componentData); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { wrapper.AddComponentData(entity, new Scale { Value = m_scale }); }
public EntityWrapper(Entity entity) { Entity = entity; EntityManagerWrapper = EntityManagerWrapper.Default; Variables = new EntityVariableMap(); }
public EntityWrapper(Entity entity, EntityManagerWrapper entityManagerWrapper, EntityVariableMap variables) { Entity = entity; EntityManagerWrapper = entityManagerWrapper; Variables = variables; }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { wrapper.AddComponentObject(entity, m_componentObject); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { #if UNITY_EDITOR wrapper.SetName(entity, m_name); #endif }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, ref EntityBuilderData data) { wrapper.SetComponentData(data.entity, new Translation { Value = m_position }); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, Entity entity) { wrapper.SetComponentData(entity, m_componentData); }
public Entity Create(EntityManagerWrapper wrapper, EntityVariableMap variables) { return(wrapper.CreateEntity()); }
public EntityWrapper(Entity entity, EntityManagerWrapper entityManagerWrapper) { Entity = entity; EntityManagerWrapper = entityManagerWrapper; Variables = new EntityVariableMap(); }
public void Process(EntityManagerWrapper wrapper, EntityVariableMap variables, ref EntityBuilderData data) { data.entity = wrapper.CreateEntity(); }
public Entity Create(EntityManagerWrapper wrapper, EntityVariableMap variables) { return(wrapper.CreateEntity(EntityArchetypeManager.Instance.GetOrCreateArchetype <T>())); }
public Entity Create(EntityManagerWrapper wrapper, EntityVariableMap variables) { return(wrapper.Instantiate(m_prefabEntity)); }