Пример #1
0
        private void Load()
        {
            if (curCard != null)
            {
                Destroy(curCard.cardObject.transformObj.gameObject);
            }

            CardFacilitie facilitie = new SadowTwoSideCardFacilitie();

            curCard = facilitie.CreateMinionCard();
            curCard.Configure();
            Debug.Log("Card Built!");
        }
Пример #2
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();
            }
        }