Esempio n. 1
0
        protected static void sync(MemoryEndianBinaryReader reader, BattleToPlayerProxy proxy)
        {
            Sync sync;

            sync = new Sync();
            sync.Deserialize(reader);
            proxy.sync(sync);
        }
Esempio n. 2
0
        protected static void playerSpawned(MemoryEndianBinaryReader reader, BattleToPlayerProxy proxy)
        {
            Int32    entityId;
            SyncItem item;

            entityId = reader.ReadInt32();
            item     = new SyncItem();
            item.Deserialize(reader);
            proxy.playerSpawned(entityId, item);
        }
Esempio n. 3
0
        protected static void onJoinArena(MemoryEndianBinaryReader reader, BattleToPlayerProxy proxy)
        {
            Int32 arenaId;
            Sync  sync;
            Int32 entityId;

            arenaId = reader.ReadInt32();
            sync    = new Sync();
            sync.Deserialize(reader);
            entityId = reader.ReadInt32();
            proxy.onJoinArena(arenaId, sync, entityId);
        }
Esempio n. 4
0
        public static void Dispatch(MemoryEndianBinaryReader reader, BattleToPlayerProxy proxy)
        {
            int fid = reader.ReadByte();

            switch (fid)
            {
            case 0:
            {
                battlePing(reader, proxy);
            }
            break;

            case 1:
            {
                battlePong(reader, proxy);
            }
            break;

            case 2:
            {
                onJoinArena(reader, proxy);
            }
            break;

            case 3:
            {
                sync(reader, proxy);
            }
            break;

            case 4:
            {
                playerSpawned(reader, proxy);
            }
            break;
            }
        }
Esempio n. 5
0
 protected static void battlePong(MemoryEndianBinaryReader reader, BattleToPlayerProxy proxy)
 {
     proxy.battlePong();
 }