Example #1
0
    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);
    }
Example #2
0
 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));
     }
 }
Example #3
0
    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);
        }
    }
Example #4
0
    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();
        });
    }