private void OnCardDrawn(CardDrawnEvent evt)
        {
            Transform cardobj = Factory.CreateCard(evt.DrawnCard);

            if(evt.DrawnCard.HasModule<GraphicsModule>())
            {
                var graphics = evt.DrawnCard.Module<GraphicsModule>();
                cardobj.renderer.material.SetTexture("_MainTex", TextureDictionary.GetTexture("cards_" + graphics.TextureId));
            }
            cardOrder.AddLast(cardobj);
            cardobj.parent = playerCam.transform;
            currentHand.Add(evt.DrawnCard, cardobj);

            PositionHand();
            cardobj.gameObject.SetActive(this.player.HasPriority);
        }
Esempio n. 2
0
        private void OnPlayerDrawCard(CardDrawnEvent evt)
        {
            //var cardobj = (Transform)GameObject.Instantiate(this.guiinfo.CardTemplate);

            //var cardhandler = cardobj.gameObject.AddComponent<CardViewHandler>();
            //var card = evt.DrawnCard;
            //Texture tex = TextureDictionary.GetTexture("cards_"+card.Module<GraphicsModule>().TextureId);
            //cardhandler.Texture = tex;
            //cardhandler.Card = card;
        }