Gurpenator.GurpsCharacter.getPurchasedProperty C# (CSharp) Метод

getPurchasedProperty() публичный Метод

public getPurchasedProperty ( string name ) : PurchasedProperty
name string
Результат PurchasedProperty
        public PurchasedProperty getPurchasedProperty(string name)
        {
            try { return nameToPurchasedAttribute[name]; }
            catch (KeyNotFoundException) { throw new GurpenatorException("Character requires trait that is not defined in any loaded database: \"" + name + "\""); }
        }

Usage Example

Пример #1
0
 private void newCharacter()
 {
     // default human
     var character = new GurpsCharacter(database);
     character.getPurchasedProperty("Human").PurchasedLevels = 1;
     setCharacter(character);
     filePath = null;
     savedName = null;
     Dirty = false;
     setTitle();
     Preferences.Instance.RecentCharacter = filePath;
 }
All Usage Examples Of Gurpenator.GurpsCharacter::getPurchasedProperty