Exemplo n.º 1
0
        private void HandleEnemyHeld(byte[] array)
        {
            var packet = new DataBuffer(array);
            int count  = packet.ReadInt();

            DataManager.RemoveAllCards(CardType.EnemyHeld);
            for (int i = 0; i < count; i++)
            {
                int id = packet.ReadInt();
                DataManager.AddCard(CardType.EnemyHeld, "Blank", id, 0, 0);
            }
        }
Exemplo n.º 2
0
        private void HandleMyField(byte[] array)
        {
            var packet = new DataBuffer(array);
            int count  = packet.ReadInt();

            DataManager.RemoveAllCards(CardType.MyField);
            for (int i = 0; i < count; i++)
            {
                int    id      = packet.ReadInt();
                string surface = packet.ReadString();
                int    attack  = packet.ReadInt();
                int    health  = packet.ReadInt();
                DataManager.AddCard(CardType.MyField, surface, id, attack, health);
            }
        }