예제 #1
0
        private T CreateInstance <T>(CardJson cj, string str)
        {
            var type = Type.GetType($"Furuyoni.Model.{str}", true);
            var args = new object[] { cj };

            return((T)Activator.CreateInstance(type, args));
        }
예제 #2
0
        public Atack(CardJson cj)
        {
            Range = cj.Range;
            var damage = cj.Damage.Split('/');

            AuraDamage = damage[0];
            LifeDamage = damage[1];
        }
예제 #3
0
 public Card(CardJson cj)
 {
     Name     = cj.Name;
     Owner    = cj.Owner;
     Text     = cj.Text;
     Category = CreateInstance <CardType>(cj, cj.Category);
     Main     = CreateInstance <CardType>(cj, cj.Main);
     Sub      = CreateInstance <CardType>(cj, cj.Sub);
 }
예제 #4
0
 public class FullPower : CardType { public FullPower(CardJson _)
                                     {
                                     }
예제 #5
0
 public class Reaction : CardType { public Reaction(CardJson _)
                                    {
                                    }
예제 #6
0
 public class None : CardType { public None(CardJson _)
                                {
                                }
예제 #7
0
 public class Unknown : CardType { public Unknown(CardJson _)
                                   {
                                   }
예제 #8
0
 public Grant(CardJson cj) => Charge = cj.Charge;
예제 #9
0
 public class Action : CardType { public Action(CardJson _)
                                  {
                                  }
예제 #10
0
 public Special(CardJson cj) => Cost = cj.Cost;
예제 #11
0
 public class TransForm : CardType { public TransForm(CardJson _)
                                     {
                                     }
예제 #12
0
 public class Poison : CardType { public Poison(CardJson _)
                                  {
                                  }
예제 #13
0
 public class Normal : CardType { public Normal(CardJson _)
                                  {
                                  }