Example #1
0
    public bool Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            ref DataStreamReader reader, NetworkCompressionModel compressionModel)
    {
        switch (serializer)
        {
        case 0:
            return(GhostReceiveSystem <UnityGroceryGhostDeserializerCollection> .InvokeDeserialize(m_Char_CapsuleSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                   baseline3, ref reader, compressionModel));

        case 1:
            return(GhostReceiveSystem <UnityGroceryGhostDeserializerCollection> .InvokeDeserialize(m_PlayerStateSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                   baseline3, ref reader, compressionModel));

        case 2:
            return(GhostReceiveSystem <UnityGroceryGhostDeserializerCollection> .InvokeDeserialize(m_GameModeSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                   baseline3, ref reader, compressionModel));

        case 3:
            return(GhostReceiveSystem <UnityGroceryGhostDeserializerCollection> .InvokeDeserialize(m_Char_BanditSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                   baseline3, ref reader, compressionModel));

        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }
    public void Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            DataStreamReader reader,
                            ref DataStreamReader.Context ctx, NetworkCompressionModel compressionModel)
    {
        switch (serializer)
        {
        case 0:
            GhostReceiveSystem <GhostDeserializerCollection> .InvokeDeserialize(m_ShipSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                baseline3, reader, ref ctx, compressionModel);

            break;

        case 1:
            GhostReceiveSystem <GhostDeserializerCollection> .InvokeDeserialize(m_AsteroidSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                baseline3, reader, ref ctx, compressionModel);

            break;

        case 2:
            GhostReceiveSystem <GhostDeserializerCollection> .InvokeDeserialize(m_BulletSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                baseline3, reader, ref ctx, compressionModel);

            break;

        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }
    public bool Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            DataStreamReader reader,
                            ref DataStreamReader.Context ctx, NetworkCompressionModel compressionModel)
    {
        switch (serializer)
        {
        case 0:
            return(GhostReceiveSystem <DotsSampleGhostDeserializerCollection> .InvokeDeserialize(m_PlayerStateSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                 baseline3, reader, ref ctx, compressionModel));

        case 1:
            return(GhostReceiveSystem <DotsSampleGhostDeserializerCollection> .InvokeDeserialize(m_Char_TerraformerSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                 baseline3, reader, ref ctx, compressionModel));

        case 2:
            return(GhostReceiveSystem <DotsSampleGhostDeserializerCollection> .InvokeDeserialize(m_Weapon_TerraformerSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                 baseline3, reader, ref ctx, compressionModel));

        case 3:
            return(GhostReceiveSystem <DotsSampleGhostDeserializerCollection> .InvokeDeserialize(m_GameModeSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                 baseline3, reader, ref ctx, compressionModel));

        case 4:
            return(GhostReceiveSystem <DotsSampleGhostDeserializerCollection> .InvokeDeserialize(m_TeleporterSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                 baseline3, reader, ref ctx, compressionModel));

        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }
Example #4
0
    public bool Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            ref DataStreamReader reader, NetworkCompressionModel compressionModel)
    {
        switch (serializer)
        {
        case 0:
            return(GhostReceiveSystem <DOTSGhostDeserializerCollection> .InvokeDeserialize(m_SpawnerSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                           baseline3, ref reader, compressionModel));

        case 1:
            return(GhostReceiveSystem <DOTSGhostDeserializerCollection> .InvokeDeserialize(m_CubeSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                           baseline3, ref reader, compressionModel));

        case 2:
            return(GhostReceiveSystem <DOTSGhostDeserializerCollection> .InvokeDeserialize(m_ItemSpawnerSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                           baseline3, ref reader, compressionModel));

        case 3:
            return(GhostReceiveSystem <DOTSGhostDeserializerCollection> .InvokeDeserialize(m_CharacterSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                           baseline3, ref reader, compressionModel));

        case 4:
            return(GhostReceiveSystem <DOTSGhostDeserializerCollection> .InvokeDeserialize(m_ItemSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                           baseline3, ref reader, compressionModel));

        case 5:
            return(GhostReceiveSystem <DOTSGhostDeserializerCollection> .InvokeDeserialize(m_NetSessionSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                           baseline3, ref reader, compressionModel));

        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }
    public void Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            DataStreamReader reader,
                            ref DataStreamReader.Context ctx, NetworkCompressionModel compressionModel)
    {
        switch ((GhostSerializerCollection.SerializerType)serializer)
        {
        case GhostSerializerCollection.SerializerType.Ship:
            GhostReceiveSystem.InvokeDeserialize(shipSnapshotFromEntity, entity, snapshot, baseline, baseline2,
                                                 baseline3, reader, ref ctx, compressionModel);
            break;

        case GhostSerializerCollection.SerializerType.Asteroid:
            GhostReceiveSystem.InvokeDeserialize(asteroidSnapshotFromEntity, entity, snapshot, baseline, baseline2,
                                                 baseline3, reader, ref ctx, compressionModel);
            break;

        case GhostSerializerCollection.SerializerType.Bullet:
            GhostReceiveSystem.InvokeDeserialize(bulletSnapshotFromEntity, entity, snapshot, baseline, baseline2,
                                                 baseline3, reader, ref ctx, compressionModel);
            break;

        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }
Example #6
0
    public bool Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            ref DataStreamReader reader, NetworkCompressionModel compressionModel)
    {
        switch (serializer)
        {
        case 0:
            return(GhostReceiveSystem <PlayersGhostDeserializerCollection> .InvokeDeserialize(m_PilotSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                              baseline3, ref reader, compressionModel));

        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }
Example #7
0
    public bool Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            ref DataStreamReader reader, NetworkCompressionModel compressionModel)
    {
        switch (serializer)
        {
            #region __GHOST_INVOKE_DESERIALIZE__
        case __GHOST_SERIALIZER_INDEX__:
            return(GhostReceiveSystem <__GHOST_COLLECTION_PREFIX__GhostDeserializerCollection> .InvokeDeserialize(m___GHOST_SNAPSHOT_TYPE__FromEntity, entity, snapshot, baseline, baseline2,
                                                                                                                  baseline3, ref reader, compressionModel));

            #endregion
        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }
    public bool Deserialize(int serializer, Entity entity, uint snapshot, uint baseline, uint baseline2, uint baseline3,
                            ref DataStreamReader reader, NetworkCompressionModel compressionModel)
    {
        switch (serializer)
        {
        case 0:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_PlayerSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        case 1:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_ArrowSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        case 2:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_AArcherSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        case 3:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_ACivilianSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        case 4:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_BArcherSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        case 5:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_BCivilianSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        case 6:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_A_BarracksSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        case 7:
            return(GhostReceiveSystem <MobileRTSGhostDeserializerCollection> .InvokeDeserialize(m_B_BarracksSnapshotDataFromEntity, entity, snapshot, baseline, baseline2,
                                                                                                baseline3, ref reader, compressionModel));

        default:
            throw new ArgumentException("Invalid serializer type");
        }
    }