public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) { var data = new InputComponent { Speed = speed }; dstManager.AddComponentData(entity, data); }
public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex) { var chunkInputs = chunk.GetNativeArray(InputComponent); for (var i = 0; i < chunk.Count; i++) { float speed = chunkInputs[i].Speed; chunkInputs[i] = new InputComponent { Speed = speed, Horizontal = Horizontal, Vertical = Vertical }; } }