private void GetEventCard(int cardId, string guid) { EventCardWrapper wrapper = new EventCardWrapper((EventCard)DefaultResources.GetCardById(cardId, DefaultResources.CardType.Event), guid); CardBehaviour cardBehaviour = CardsLayoutManager.Instance.CreateCardIn(wrapper, CardsLayoutManager.SlotType.EventDeck); CardsLayoutManager.Instance.MoveCardTo(cardBehaviour, CardsLayoutManager.SlotType.EventDrop); }
private void GiveCardToPlayer(int playerId, int cardId, string cardGuid) { if (playerId == PhotonNetwork.LocalPlayer.ActorNumber) //visualise giving cards only for local player { AddCardToDeck((BattleCard)DefaultResources.GetCardById(cardId, DefaultResources.CardType.Battle), cardGuid); //TakeCard((BattleCard)DefaultResources.GetCardById(cardId)); } }
private void TakeCardFromDeck(int playerId, int cardId, string cardGuid) { Debug.Log("TC1"); if (playerId == PhotonNetwork.LocalPlayer.ActorNumber) //visualise giving cards only for local player { TakeCard((BattleCard)DefaultResources.GetCardById(cardId, DefaultResources.CardType.Battle), cardGuid); } }
private void DeckClicked(int cardId, string cardGuid) { EncounterCardWrapper wrapper = new EncounterCardWrapper((EncounterCard)DefaultResources.GetCardById(cardId, DefaultResources.CardType.Encounter), cardGuid); CardBehaviour cardBehaviour = CardsLayoutManager.Instance.CreateCardIn(wrapper, CardsLayoutManager.SlotType.EncounterDeck); CardsLayoutManager.Instance.MoveCardTo(cardBehaviour, CardsLayoutManager.SlotType.CurrentEncounter, () => { cardBehaviour.GetComponent <EncounterCardVisual>().ShowVariants(); }); }