public void DeserializeMultiple_ReturnsMultipleEntities() { var multipleSerialised = LoadFile("EntityEngineSystem/TestData/ExpectedSerialization_MultipleEntities.txt"); var entities = EntitySerializer.DeserializeAll(SystemContainer, new[] { multipleSerialised }); var expected = new List <Entity> { GetTestEntity(0), GetTestEntity(0) }; entities.Should().BeEquivalentTo(expected, options => options.Using(new EntityListEquivalence())); }
private void SetKeyBindings() { var keyBindingsData = keyBindingsDataProvider.GetData(); var bindings = EntitySerializer.DeserializeAll(_systemContainer, keyBindingsData).SingleOrDefault(); if (bindings != null) { _keyBindings = bindings.Components.OfType <KeyBinding>().ToList(); } else { _keyBindings = new List <KeyBinding>(); } }
private void LoadEntityData(ISystemContainer systemContainer) { var worldData = _worldEntityDataProvider.GetData(); EntitySerializer.DeserializeAll(systemContainer, worldData); }