Exemplo n.º 1
0
    private void SendCardToHand(CardVisual card)
    {
        //Debug.Log(card.gameObject.name + " is being sent to the hand");

        if (owner.handManager.IsCollectionFull())
        {
            Debug.LogWarning("Hand is Full");
            //StartCoroutine(SendCardToSoulCrypt(card));
            SendCardToSoulCrypt(card);
            return;
        }

        if (card.photonView.isMine)
        {
            card.RPCChangeCardVisualState(PhotonTargets.Others, CardVisual.CardVisualState.ShowBack);
            card.ChangeCardVisualState((int)CardVisual.CardVisualState.ShowFront);
            //Debug.Log(card.cardData.cardName + " is mine and is showing the card back to others");
        }

        if (!Mulligan.choosingMulligan)
        {
            CheckAndActivateCard(card);
            card.handPos = owner.handManager.GetFirstEmptyCardPosition(card);
        }
        else
        {
            card.RPCSetCardAciveState(PhotonTargets.All, false);
            card.handPos = owner.mulliganManager.GetFirstEmptyCardPosition(card);
        }
    }
Exemplo n.º 2
0
 private void SendCardToGrimoire(CardVisual card)
 {
     if (card.photonView.isMine)
     {
         card.RPCChangeCardVisualState(PhotonTargets.Others, CardVisual.CardVisualState.ShowBack);
         card.ChangeCardVisualState((int)CardVisual.CardVisualState.ShowFront);
         //Debug.Log(card.cardData.cardName + " is mine and is showing the card back to others");
         card.transform.position = new Vector3(0f, 0f, -60f);
     }
 }
Exemplo n.º 3
0
    //private IEnumerator RemoveCardVisualFromField(CardVisual card) {
    //    card.SetCardActiveState(false);
    //    yield return new WaitForSeconds(3f);

    //    if (card.photonView.isMine) {
    //        card.ChangeCardVisualState((int)CardVisual.CardVisualState.ShowFront);
    //        card.RPCChangeCardVisualState(PhotonTargets.Others, CardVisual.CardVisualState.ShowBack);
    //    }

    //    if (card is CreatureCardVisual) {
    //        CreatureCardVisual creature = card as CreatureCardVisual;
    //        creature.RPCToggleExhaust(PhotonTargets.All, false);
    //    }

    //    card.transform.localPosition = new Vector3(-40f, 20f, 20f);

    //}

    private void SendCardToVoid(CardVisual card)
    {
        if (card.photonView.isMine)
        {
            card.ChangeCardVisualState((int)CardVisual.CardVisualState.ShowFront);
            card.RPCChangeCardVisualState(PhotonTargets.Others, CardVisual.CardVisualState.ShowBack);
        }

        if (card is CreatureCardVisual)
        {
            CreatureCardVisual creature = card as CreatureCardVisual;
            creature.RPCToggleExhaust(PhotonTargets.All, false);
        }

        //card.ResetCardData();
        //card.RPCSetUpCardData(PhotonTargets.All);
        //card.SetupCardData();
        if (card.photonView.isMine)
        {
            card.transform.localPosition = new Vector3(-80f, 20f, -40f);
        }
    }