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; }
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)); }
public void EquipWeapon(Weapon weapon) { equippedweapon = weapon; }