コード例 #1
0
        public EntityStructInitializer BuildDeserializedEntity(EGID egid,
                                                               ISerializationData serializationData,
                                                               ISerializableEntityDescriptor entityDescriptor,
                                                               SerializationType serializationType,
                                                               IEntitySerialization entitySerialization)
        {
            var initializer = _factory.BuildEntity <T>(egid, _implementors);

            entitySerialization.DeserializeEntityStructs(serializationData, entityDescriptor, ref initializer, serializationType);

            return(initializer);
        }
コード例 #2
0
        public EntityInitializer BuildDeserializedEntity
            (EGID egid, ISerializationData serializationData, ISerializableEntityDescriptor entityDescriptor
            , int serializationType, IEntitySerialization entitySerialization, IEntityFactory factory
            , bool enginesRootIsDeserializationOnly)
        {
            var entityDescriptorEntitiesToSerialize = enginesRootIsDeserializationOnly ? entityDescriptor.componentsToSerialize : entityDescriptor.componentsToBuild;

            var initializer = factory.BuildEntity(egid, entityDescriptorEntitiesToSerialize, TypeCache <T> .type, _implementors);

            entitySerialization.DeserializeEntityComponents(serializationData, entityDescriptor, ref initializer
                                                            , serializationType);

            return(initializer);
        }