Пример #1
0
 void ReturnToMyHand()
 {
     // move this back to the hand
     gm.myHand.CorrectCardPositions();
     mouseTargetable.SetTargetingGroup(TargetingGroup.CardInMyHandPlayable);
     status = CardStatus.InHand;
     sortingLayerManager.SetSortingLayer("CardInHand");
 }
Пример #2
0
 public void AddCard(Card c)
 {
     if (IsOccupied())
     {
         Debug.LogError("Cannot add card to occupied card slot!");
         return;
     }
     if (!CardCategoryIsValid(c))
     {
         Debug.LogError("Cannot add card of type " + c.GetCategory() + " to this card slot", this);
         return;
     }
     card = c;
     mouseTargetable.SetTargetingGroup(GetFullTargetingGroup());
 }
Пример #3
0
    public void Setup(CardCategory requiredCardCategory, bool isMine)
    {
        this.slotType = requiredCardCategory;

        // setup slot sprite
        if (slotType == CardCategory.Operative)
        {
            GetComponentInChildren <SpriteRenderer>().sprite = operativeSlotSprite;
        }
        else
        {
            GetComponentInChildren <SpriteRenderer>().sprite = policySlotSprite;
        }

        this.isMine = isMine;         // is this a local or enemy operative slot?

        if (animateIn)
        {
            Vector2 scale = transform.localScale;
            transform.localScale = Vector2.zero;
            transform.DOScale(scale, 0.2f);
        }

        mouseTargetable = GetComponent <MouseTargetable>();
        mouseTargetable.SetTargetingGroup(GetEmptyTargetingGroup());
    }
Пример #4
0
 void PickUp()
 {
     if (heldGO == null && isDraggable && mouseTargetable.TargetingGroupIsActive())
     {
         heldGO = this.gameObject;
         mouseTargetable.SetTargetingGroup(TargetingGroup.DraggedObject);
         InvokeAllActions(OnPickUp);
     }
 }
Пример #5
0
    /// When the enemy draws a card, this client shouldn't know what it is
    public void ConcealedSetup(GameManager gm, int playerNumWhoPlayedThis)
    {
        isConcealed = true;
        FlipFaceDown(false);

        titleText.text       = "Concealed";
        descriptionText.text = "Concealed";

        mouseTargetable = GetComponent <MouseTargetable>();
        mouseTargetable.SetTargetingGroup(TargetingGroup.CardInEnemyHand);

        this.gm       = gm;
        tempPlayerNum = playerNumWhoPlayedThis;
    }