public void OpenCardScript()
                            {
                                string targetPath = Application.dataPath + $@"\Script\9_MixedScene\CardSpace\Card{cardId}.cs";

                                CardLibraryCommand.CreatScript(cardId);
                                System.Diagnostics.Process.Start(targetPath);
                            }
Example #2
0
 public void AddCardModely()
 {
     //卡牌添加条件,暂时为名字不为空
     if (CardName != "")
     {
         if (CardModelInfos == null)
         {
             CardModelInfos = new List <CardModelInfo>();
         }
         int NewCardId = int.Parse($"{10}{(int)sectarian}{CardModelInfos.Count}");
         CardLibraryCommand.CreatScript(NewCardId);
         CardModelInfos.Add(new CardModelInfo(icon, NewCardId, CardName, Point, sectarian));
         CardNum = CardModelInfos.Count;
     }
 }
                            public CardModelInfo(int cardId, string level, string cardName, string describe, string ability, string cardTag, CardType cardType, Sectarian sectarian, CardRank rank, Region cardProperty, Territory cardTerritory, int point, int ramification, Texture2D icon)
                            {
                                this.icon     = icon;
                                this.cardId   = cardId;
                                this.level    = level;
                                this.cardName = cardName;
                                this.describe = describe;
                                this.ability  = ability;
                                this.cardTag  = String.Join(" ", cardTag.Split(' ').Select(x => x.TransTag()));
                                Debug.LogError(cardTag + "--" + this.cardTag);

                                this.point         = point;
                                this.cardType      = cardType;
                                this.sectarian     = sectarian;
                                this.cardProperty  = cardProperty;
                                this.cardTerritory = cardTerritory;
                                this.cardRank      = rank;
                                CardLibraryCommand.CreatScript(cardId);
                            }