コード例 #1
0
        //public typeslogic

        public virtual void OnSetType(CardViz viz)
        {
            Element           t    = Settings.GetResourcesManager().typeElement;
            CardVizProperties type = viz.GetProperty(t);

            type.text.text = typeName;
        }
コード例 #2
0
        void CreateStartingCards()
        {
            ResourcesManager rm = Settings.GetResourcesManager();

            for (int j = 0; j < allPlayers.Length; j++)
            {
                for (int i = 0; i < allPlayers[j].startingCards.Length; i++)
                {
                    GameObject go      = Instantiate(cardPrefab) as GameObject;
                    CardViz    cardViz = go.GetComponent <CardViz>();
                    cardViz.LoadCard(rm.GetCardInstance(allPlayers[j].startingCards[i]));
                    CardInstance inst = go.GetComponent <CardInstance>();
                    inst.currentLogic = allPlayers[j].handLogic;
                    Settings.SetParentForCard(go.transform, allPlayers[j].currentHolder.handGrid.value.transform);
                    allPlayers[j].handCards.Add(inst);
                }

                allPlayers[j].currentHolder.LoadPlayer(allPlayers[j], allPlayers[j].statsUI);

                Settings.RegisterEvent("Created cards for player" + allPlayers[j].username, Color.white);
            }
        }
コード例 #3
0
ファイル: Spell.cs プロジェクト: priseceanpaul/DM
 public override void OnSetType(CardViz viz)
 {
     base.OnSetType(viz);
     viz.statsHolder.SetActive(false);
 }
コード例 #4
0
ファイル: CardInstance.cs プロジェクト: priseceanpaul/DM
 void Start()
 {
     viz = GetComponent <CardViz>();
 }