public void AddNetEntity(NetCreatableInfo info, INetEntity entity)
        {
            NetEntitySnapshot    snapshot = entity.CreateSnapshot(info, snapshotSystem);
            DynamicSnapshotField field    = AddNestedField(info.Id, snapshot);

            snapshotFields.Add(info.Id, field);
        }
Example #2
0
        public void Add(ushort key, NetCreatableInfo creatable)
        {
            Creatables.Add(key, creatable);

            if (creatable.Creatable is INetEntity)
            {
                Entities.Add(key, creatable);
            }
        }
        public NetEntitySnapshot(INetEntity entity, NetCreatableInfo info, SnapshotSystem snapshotSystem)
            : base(snapshotSystem, info.Owner, !info.IsAppOwner)
        {
            Entity     = entity;
            EntityInfo = info;

            if (entity != info.Creatable)
            {
                throw new Exception("Failed to create NetEntitySnapshot, entity does not match the creatable info!");
            }

            EnableDeltaCompression(10);
        }