Exemplo n.º 1
0
        private void SelectedBenchedPokemonForEnergy(CardRenderer selectedCard)
        {
            if (!playerBench.GetComponentsInChildren <CardRenderer>().Any(controller => controller.card.Id.Equals(selectedCard.card.Id)))
            {
                return;
            }

            var energyCard = energyCardsToAttach.Dequeue();

            energyPokemonMap.Add(energyCard.Id, selectedCard.card.Id);

            if (energyCardsToAttach.Count == 0)
            {
                var response = new AttachedEnergyDoneMessage(energyPokemonMap);
                NetworkManager.Instance.SendToServer(response, true);
                energyPokemonMap.Clear();
            }
        }
Exemplo n.º 2
0
        public void AttachedEnergyDoneMessage()
        {
            var message = new AttachedEnergyDoneMessage(new Dictionary <NetworkId, NetworkId>());

            Assert.NotNull(SerializeAndBack(message));
        }