public PlayerProfile(string profileName) { ID = profileName; PhysicsWeaponInventory = new PhysicsWeaponManager(); Points = 0; savedProfile = null; }
public void Load() { XmlNode playerNode = savedProfile.DocumentElement; XmlNode inventoryNode = playerNode.SelectSingleNode("WeaponsInventory"); PhysicsWeaponInventory = new PhysicsWeaponManager(); foreach (XmlNode node in inventoryNode.ChildNodes) PhysicsWeaponInventory.AddWeaponDeployer( PhysicsWeaponDeployer.CreateFromName(node.Name)); Points = Int32.Parse(playerNode.Attributes.GetNamedItem("points").Value); SetCurrentMap(playerNode.Attributes.GetNamedItem("map").Value, playerNode.Attributes.GetNamedItem("portal").Value, true); }