예제 #1
0
        public virtual void OnSetType(CardViz viz)
        {
            Element           t    = Settings.GetResourcesManager().typeElement;
            CardVizProperties type = viz.GetProperties(t);

            type.text.text = typename;
        }
예제 #2
0
        public override void OnSetType(CardViz viz)
        {
            base.OnSetType(viz);

            viz.statsHolder.SetActive(true);
            viz.resourceHolder.SetActive(false);
        }
예제 #3
0
        void CreateStartingCards()
        {
            ResourcesManager rm = Settings.GetResourcesManager();

            for (int i = 0; i < currentPlayer.startingCards.Length; zi++)
            {
                GameObject go = Instantiate(cardPrefab) as GameObject;
                CardViz    v  = go.GetComponent <CardViz>();
                v.LoadCard(rm.GetCardInstance(currentPlayer.startingCards[i]));
                CardInstance inst = go.GetComponent <CardInstance>();
                inst.currentLogic = currentPlayer.handLogic;

                Settings.SetParentForCard(go.transform, currentPlayer.handGrid.value);
            }
        }
예제 #4
0
        public void PickNewCardFormDeck(PlayerHolder p)
        {
            if (p.allCards.Count == 0)
            {
                Debug.Log("Game Over");
                return;
            }
            string cardID = p.allCards[0];

            p.allCards.RemoveAt(0);
            ResourcesManager rm  = Settings.GetResourcesManager();
            GameObject       go  = Instantiate(cardPrefab) as GameObject;
            CardViz          viz = go.GetComponent <CardViz>();

            viz.Load(rm.GetCardInstance(cardID));
            CardInstance inst = go.GetComponent <CardInstance>();

            inst.currentLogic = p.handCardsLogic;
            inst.owner        = p;
            Settings.SetParentForCard(go.transform, p.currentHolder.handCardsGrid.value);
            p.handCards.Add(inst);
        }
예제 #5
0
        public override void OnSetType(CardViz viz)
        {
            base.OnSetType(viz);

            //viz.statsHolder.SetActive(false);
        }
예제 #6
0
 void Start()
 {
     cardViz = GetComponent <CardViz>();
 }
예제 #7
0
 public virtual void OnSetType(CardViz viz)
 {
     Element           t    = GameManager.GetResourceManager().typeElement;
     CardVizProperties type = viz.GetProperty(t);
     //type.text.text = typeName;
 }
예제 #8
0
 public override void OnSetType(CardViz viz)
 {
     base.OnSetType(viz);
     viz.statHolder.SetActive(true);
 }
예제 #9
0
 public void Start()
 {
     viz = GetComponent <CardViz>();
 }
예제 #10
0
 public override void OnSetType(CardViz viz)
 {
     viz.statsHolder.SetActive(true);
 }
예제 #11
0
 public abstract void OnSetType(CardViz viz);