本文整理汇总了C#中Persistence.GetEnum方法的典型用法代码示例。如果您正苦于以下问题:C# Persistence.GetEnum方法的具体用法?C# Persistence.GetEnum怎么用?C# Persistence.GetEnum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Persistence
的用法示例。
在下文中一共展示了Persistence.GetEnum方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Import
public void Import(Persistence.Lookup settings)
{
mKey = new MotiveKey(
settings.GetEnum<CASAgeGenderFlags>("AgeSpecies", CASAgeGenderFlags.None),
settings.GetEnum<OccultTypes>("Occult", OccultTypes.None),
settings.GetEnum<CommodityKind>("Commodity", CommodityKind.None)
);
mValue = settings.GetFloat("Value", 1);
}
示例2: Import
public void Import(Persistence.Lookup settings)
{
mSeason = settings.GetEnum<Season>("Season", Season.Summer);
mProfiles = settings.GetList<WeatherProfile>("Profiles");
}
示例3: Import
public override void Import(Persistence.Lookup settings)
{
mSeason = settings.GetEnum<Season>("Season", sAllSeasons);
base.Import(settings);
}
示例4: Import
public void Import(Persistence.Lookup settings)
{
mSeason = settings.GetEnum<Season>("Season", Season.Summer);
mNoSchool = settings.GetBool("NoSchool", false);
mDays = settings.GetList<Holiday>("Days");
}
示例5: Import
public void Import(Persistence.Lookup settings)
{
mSkill = settings.GetEnum<SkillNames>("Skill", SkillNames.None);
mLevel = settings.GetInt("Level", 0);
}
示例6: Import
public virtual void Import(Persistence.Lookup settings)
{
mType = settings.GetEnum<Weather>("Type", Weather.None);
Import(ref mTemp, settings, "Temp");
Import(ref mLength, settings, "Length");
mWeight = settings.GetInt("Weight", 0);
}
示例7: Import
public void Import(Persistence.Lookup settings)
{
mName = settings.GetString("Name");
if (settings.Exists("Autonomous"))
{
mAutonomous = settings.GetBool("Autonomous", false);
mFlags |= Flags.Autonomous;
}
if (settings.Exists("UserDirected"))
{
mUserDirected = settings.GetBool("UserDirected", false);
mFlags |= Flags.UserDirected;
}
if (settings.Exists("AgeSpecies"))
{
mAgeSpecies = settings.GetEnum<CASAGSAvailabilityFlags>("AgeSpecies", CASAGSAvailabilityFlags.None);
mFlags |= Flags.AgeSpecies;
mAgeSpeciesList = null;
}
if (settings.Exists("Availability"))
{
mAvailability = settings.GetEnum<Availability.FlagField>("Availability", Availability.FlagField.None);
mFlags |= Flags.Availability;
}
if (settings.Exists("Advertised"))
{
mAdvertisedOutputs.Clear();
ParseAdvertised(settings.GetStringList("Advertised"));
}
}
示例8: Import
public void Import(Persistence.Lookup settings)
{
mWorld = settings.GetEnum<WorldName>("World", GameUtils.GetCurrentWorld());
mDays = ParserFunctions.ParseDayList(settings.GetString("Days"));
mStartHour = settings.GetInt("StartHour", 0);
mEndHour = settings.GetInt("EndHour", 24);
mSpeed = settings.GetInt("Speed", Relativity.sOneMinute);
}