本文整理汇总了C#中IMiniSimDescription类的典型用法代码示例。如果您正苦于以下问题:C# IMiniSimDescription类的具体用法?C# IMiniSimDescription怎么用?C# IMiniSimDescription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMiniSimDescription类属于命名空间,在下文中一共展示了IMiniSimDescription类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Run
protected bool Run(IMiniSimDescription a, IMiniSimDescription b)
{
try
{
if (b is SimDescription)
{
SimDescription sim = b as SimDescription;
if (!Test(a, sim)) return true;
return PrivateRun(a, sim);
}
else
{
MiniSimDescription sim = b as MiniSimDescription;
if (!Test(a, sim)) return true;
return PrivateRun(a, sim);
}
}
catch (Exception e)
{
Common.Exception(a, b as SimDescription, e);
return false;
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:27,代码来源:DualSimFromList.cs
示例2: IsValidRelationship
private static bool IsValidRelationship(IMiniSimDescription sim1, IMiniSimDescription sim2, CASFamilyScreen.RelationshipType relationship)
{
switch (relationship)
{
case CASFamilyScreen.RelationshipType.Roommate:
return true;
case CASFamilyScreen.RelationshipType.Spouse:
if (!sim1.TeenOrAbove) return false;
if (!sim2.TeenOrAbove) return false;
if (CASFamilyScreenEx.kAllowAdultTeen) return true;
return (sim1.Teen == sim2.Teen);
case CASFamilyScreen.RelationshipType.Parent:
if (sim2.Age > sim1.Age) return false;
return sim1.TeenOrAbove;
case CASFamilyScreen.RelationshipType.Child:
if (sim1.Age > sim2.Age) return false;
return sim2.TeenOrAbove;
case CASFamilyScreen.RelationshipType.Sibling:
return true;
}
return false;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:28,代码来源:CASFamilyScreenEx.cs
示例3: Perform
public static void Perform(IMiniSimDescription me)
{
if (!Responder.Instance.IsGameStatePending || !Responder.Instance.IsGameStateShuttingDown)
{
Dialogs.FamilyTreeDialog.Show(me);
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:FamilyTree.cs
示例4: PrivateRun
protected override bool PrivateRun(IMiniSimDescription a, SimDescription b)
{
if (!Fixup(a as SimDescription)) return false;
if (!Fixup(b)) return false;
return Run(a.CASGenealogy as Genealogy, b.Genealogy);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:GenealogyOption.cs
示例5: GetDetails
public string GetDetails(IMiniSimDescription miniSim)
{
SimDescription me = miniSim as SimDescription;
if (me == null) return null;
string msg = PersonalStatus.GetHeader(me) + Common.NewLine;
List<string> skills = new List<string>();
foreach (Skill skill in me.SkillManager.List)
{
if (skill.SkillLevel <= 0) continue;
skills.Add(Common.Localize("SkillsStatus:Element", me.IsFemale, new object[] { skill.Name, skill.SkillLevel }));
}
if (skills.Count == 0)
{
msg += Common.Localize("SkillsStatus:NoSkill");
}
else
{
skills.Sort();
foreach (string skill in skills)
{
msg += skill;
}
}
return msg;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:32,代码来源:SkillsStatus.cs
示例6: FamilyTreeDialog
public FamilyTreeDialog(IMiniSimDescription sim)
: base(sConstructorStub)
{
mSimTreeInfos.Clear();
mSimTreeInfoEx.Clear();
RefreshTree(sim);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:FamilyTreeDialog.cs
示例7: CleanseGenealogy
public static void CleanseGenealogy(IMiniSimDescription me)
{
Genealogy genealogy = me.CASGenealogy as Genealogy;
if (genealogy != null)
{
genealogy.ClearAllGenealogyInformation();
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:Annihilation.cs
示例8: CanTextWithEachOther
public override bool CanTextWithEachOther(Sim actor, IMiniSimDescription other, bool foreignText)
{
if (!Phone.SendTextBase.SimCanTextWithActor(actor, other, foreignText))
{
return false;
}
return SendWooHootyTextEx.SimCanTextWithActorEx(actor, other, foreignText);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:SendWooHootyTextFromRelationPanelEx.cs
示例9: Allow
protected override bool Allow(SimDescription me, IMiniSimDescription actor)
{
if (!me.TeenOrAbove) return false;
if (me.mGenderPreferenceMale <= 0) return false;
return true;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:PreferenceMale.cs
示例10: GetDetails
public string GetDetails(IMiniSimDescription me)
{
string msg = null;
try
{
msg = PersonalStatus.GetHeader(me);
SimDescription simDesc = me as SimDescription;
foreach (SimPersonality personality in SP::NRaas.StoryProgression.Main.Personalities.GetClanMembership(simDesc, true))
{
msg += Common.NewLine + personality.GetLocalizedName();
if (personality.Me != null)
{
msg += Common.NewLine + Common.Localize("Personalities:Leader", personality.IsFemaleLocalization(), new object[] { personality.Me });
}
int memberCount = personality.GetClanMembers(false).Count;
if (memberCount > 0)
{
msg += Common.Localize("Personalities:Members", personality.IsFemaleLocalization(), new object[] { memberCount });
}
Dictionary<SimDescription, bool> opponents = new Dictionary<SimDescription, bool>();
foreach (SimPersonality opponent in SP::NRaas.StoryProgression.Main.Personalities.AllPersonalities)
{
if (opponent.IsOpposing(personality))
{
int count = 0;
foreach (SimDescription sim in opponent.GetClanMembers(true))
{
if (opponents.ContainsKey(sim)) continue;
opponents.Add(sim, true);
count++;
}
if (count > 0)
{
msg += Common.NewLine + Common.Localize(GetTitlePrefix() + ":Opposing", opponent.IsFemaleLocalization(), new object[] { opponent.GetLocalizedName(), count });
}
}
}
}
}
catch (Exception e)
{
Common.Exception(me.FullName, e);
msg += Common.NewLine + "END OF LINE";
}
return msg;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:58,代码来源:PersonalityStatus.cs
示例11: Allow
protected override bool Allow(MiniSimDescription me, IMiniSimDescription actor)
{
Genealogy genealogy = actor.CASGenealogy as Genealogy;
if (genealogy == null) return false;
if (!me.Genealogy.IsBloodRelated(genealogy)) return false;
return true;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:RelationBlood.cs
示例12: Allow
protected override bool Allow(MiniSimDescription me, IMiniSimDescription actor)
{
Genealogy genealogy = actor.CASGenealogy as Genealogy;
if (genealogy == null) return false;
if (me.Genealogy.IsSufficientlyRelatedToRuleOutRomance(genealogy)) return false;
return true;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:9,代码来源:RelationNone.cs
示例13: Allow
protected override bool Allow(SimDescription me, IMiniSimDescription actor)
{
SimDescription active = null;
if (Sim.ActiveActor != null)
{
active = Sim.ActiveActor.SimDescription;
}
return (me == active);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:10,代码来源:ActiveSim.cs
示例14: AllowSpecies
protected override bool AllowSpecies(IMiniSimDescription me)
{
if (Common.AssemblyCheck.IsInstalled("NRaasWoohooer"))
{
return true;
}
else
{
return me.IsHuman;
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:11,代码来源:BabyMultiple.cs
示例15: Update
public override SimSelection.UpdateResult Update(IMiniSimDescription actor, IEnumerable<SimSelection.ICriteria> criteria, List<IMiniSimDescription> allSims, bool secondStage)
{
if (secondStage) return SimSelection.UpdateResult.Success;
mPrefix = StringInputDialog.Show(Name, Common.Localize(GetTitlePrefix() + ":Prompt", actor.IsFemale), "");
if (string.IsNullOrEmpty(mPrefix)) return SimSelection.UpdateResult.Failure;
mPrefix = mPrefix.Trim().ToLower();
return base.Update(actor, criteria, allSims, secondStage);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:11,代码来源:FirstName.cs
示例16: GetDetails
public string GetDetails(IMiniSimDescription mini)
{
SimDescription sim = mini as SimDescription;
if (sim != null)
{
return NRaas.MasterControllerSpace.Households.StatusBase.GetDetails(sim.LotHome, sim.Household);
}
else
{
return null;
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:12,代码来源:HouseholdStatus.cs
示例17: Prompt
protected bool Prompt (IMiniSimDescription me)
{
if (!ApplyAll)
{
if (!AcceptCancelDialog.Show(Common.Localize("TotalAnnihilation:Prompt", me.IsFemale, new object[] { me })))
{
return false;
}
}
return true;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:12,代码来源:TotalAnnihilation.cs
示例18: GetPartnerType
private PartnerType GetPartnerType(IMiniSimDescription simA, IMiniSimDescription simB)
{
if ((simA.CASGenealogy.ISpouse != null) && (simA.CASGenealogy.ISpouse.IMiniSimDescription == simB))
{
return simA.CASGenealogy.PartnerType;
}
IMiniSimDescription spouseA = FindDeadPartner(simA, false);
if (spouseA != simB)
{
return PartnerType.None;
}
IMiniSimDescription spouseB = FindDeadPartner(simB, false);
if (spouseB != simA)
{
return PartnerType.None;
}
SimDescription a = simA as SimDescription;
SimDescription b = simB as SimDescription;
if ((a != null) && (b != null))
{
Relationship relation = Relationship.Get(a, b, false);
if (relation == null)
{
return PartnerType.None;
}
else
{
switch (relation.CurrentLTR)
{
case LongTermRelationshipTypes.Ex:
case LongTermRelationshipTypes.Partner:
return PartnerType.BGFriend;
case LongTermRelationshipTypes.ExSpouse:
case LongTermRelationshipTypes.Spouse:
return PartnerType.Marriage;
case LongTermRelationshipTypes.Fiancee:
return PartnerType.Fiance;
default:
return PartnerType.None;
}
}
}
return PartnerType.None;
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:49,代码来源:FamilyTreeDialog.cs
示例19: Allow
protected override bool Allow(SimDescription me, IMiniSimDescription actor)
{
if (actor is SimDescription)
{
return (me.Household == (actor as SimDescription).Household);
}
else if (actor is MiniSimDescription)
{
return (actor as MiniSimDescription).HouseholdMembers.Contains(me.SimDescriptionId);
}
else
{
return false;
}
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:15,代码来源:SameHousehold.cs
示例20: GetCurrentAgeInDays
public static float GetCurrentAgeInDays(IMiniSimDescription sim)
{
float agingYears = 0;
foreach (CASAgeGenderFlags age in GetAges(sim.Species))
{
if (age >= sim.Age) continue;
agingYears += AgingManager.GetAgingStageLength(sim.Species, age);
}
agingYears += sim.YearsSinceLastAgeTransition;
return AgingManager.Singleton.AgingYearsToSimDays(agingYears);
}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:15,代码来源:Aging.cs
注:本文中的IMiniSimDescription类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论