示例#1
0
 public Player(string name, WarriorStats stats, List<Item> inventory, Weapon weapon, Armour armour)
 {
     this.Name = name;
     this.stats = stats;
     this.inventory = inventory;
     this.equippedweapon = weapon;
     this.equippedarmour = armour;
 }
示例#2
0
        public Player(SerializationInfo info, StreamingContext ctxt)
        {
            this.stats = (WarriorStats)info.GetValue("stats", typeof(WarriorStats));
            this.inventory = (List<Item>)info.GetValue("inventory", typeof(List<Item>));
            this.equippedweapon = (Weapon)info.GetValue("weapon", typeof(Weapon));
            this.equippedarmour = (Armour)info.GetValue("armour", typeof(Armour));

            this.Name = (string)info.GetValue("Name", typeof(string));
            this.XP = (int)info.GetValue("XP", typeof(int));
            this.Gold = (int)info.GetValue("Gold", typeof(int));
        }
示例#3
0
 public void EquipWeapon(Weapon weapon)
 {
     equippedweapon = weapon;
 }