예제 #1
0
        void OnMouseDown()
        {
            if (cards.Count <= maxCards)
            {
                CardFacilitie facilitie = new SadowTwoSideCardFacilitie();
                CardRender    curCard   = facilitie.CreateMinionCard();
                curCard.Configure();
                Transform card = curCard.cardObject.transformObj;

                BoxCollider box = curCard.face.transform.gameObject.AddComponent <BoxCollider>();
                box.size = new Vector3(box.size.x, box.size.y, 0.1f);
                SelectCard s = curCard.face.transform.gameObject.AddComponent <SelectCard>();
                s.myTransform = card;
                s.creator     = this;

                card.localScale = new Vector3(size, size, 1);
                card.rotation   = hand.transform.rotation;

                cards.Add(s);
                setHand();
            }
        }
예제 #2
0
 void OnMouseDown()
 {
     select = this;
 }