コード例 #1
0
 public PlayerProfile(string profileName)
 {
     ID = profileName;
     PhysicsWeaponInventory = new PhysicsWeaponManager();
     Points = 0;
     savedProfile = null;
 }
コード例 #2
0
        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);
        }