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(); } }
public void AttachedEnergyDoneMessage() { var message = new AttachedEnergyDoneMessage(new Dictionary <NetworkId, NetworkId>()); Assert.NotNull(SerializeAndBack(message)); }