示例#1
0
        public Relic(RelicTransferModel relic)
        {
            relicName        = relic.RelicName;
            relicSpriteName  = relic.RelicSpriteName;
            relicDescription = relic.RelicDescription;
            relicRarity      = relic.RelicRarity;

            relicEffects = new List <Effect>();
            foreach (var item in relic.RelicEffectsString)
            {
                string[]      s          = item.Split(' ');
                var           effectType = Type.GetType("Models." + s[0] + "Effect");
                Effect        effect     = Activator.CreateInstance(effectType) as Effect;
                List <string> temp       = new List <string>();
                foreach (var i in Enumerable.Range(1, s.Length - 1))
                {
                    temp.Add(s[i]);
                }
                effect.SetEffect(temp);
                relicEffects.Add(effect);
            }
        }
示例#2
0
 public Armor(string name, int armorClass, Rarity rarity) : base(name, rarity)
 {
     ArmorClass = armorClass;
 }
示例#3
0
        //----------------------------------------------------------------------------------------------------------------------------------------------//
        //                                                                 CONSTRUCTORS                                                                 //
        //----------------------------------------------------------------------------------------------------------------------------------------------//
        public Skin(int ID, string Weapon, string Name, string Collection, int PatternID, double SkinFloat, decimal Price, DateTime DateAdded, Rarity Rarity)
        {
            id = ID;

            weapon     = Weapon;
            name       = Name;
            collection = Collection;
            patternID  = PatternID;
            skinFloat  = SkinFloat / 1000000000;
            price      = Price;
            dateAdded  = DateAdded;

            rarity = Rarity;
        }
示例#4
0
 public GameItem(string name, Rarity rarity)
 {
     Name   = name;
     Rarity = rarity;
 }
示例#5
0
 public Weapon(string name, int damage, float attackSpeed, Rarity rarity) : base(name, rarity)
 {
     Damage      = damage;
     AttackSpeed = attackSpeed;
 }