本文整理汇总了C#中IMiniSimDescription类的典型用法代码示例。如果您正苦于以下问题:C# IMiniSimDescription类的具体用法?C# IMiniSimDescription怎么用?C# IMiniSimDescription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMiniSimDescription类属于命名空间,在下文中一共展示了IMiniSimDescription类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
}
示例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;
}
示例3: Perform
public static void Perform(IMiniSimDescription me)
{
if (!Responder.Instance.IsGameStatePending || !Responder.Instance.IsGameStateShuttingDown)
{
Dialogs.FamilyTreeDialog.Show(me);
}
}
示例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);
}
示例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;
}
示例6: FamilyTreeDialog
public FamilyTreeDialog(IMiniSimDescription sim)
: base(sConstructorStub)
{
mSimTreeInfos.Clear();
mSimTreeInfoEx.Clear();
RefreshTree(sim);
}
示例7: CleanseGenealogy
public static void CleanseGenealogy(IMiniSimDescription me)
{
Genealogy genealogy = me.CASGenealogy as Genealogy;
if (genealogy != null)
{
genealogy.ClearAllGenealogyInformation();
}
}
示例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);
}
示例9: Allow
protected override bool Allow(SimDescription me, IMiniSimDescription actor)
{
if (!me.TeenOrAbove) return false;
if (me.mGenderPreferenceMale <= 0) return false;
return true;
}
示例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;
}
示例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;
}
示例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;
}
示例13: Allow
protected override bool Allow(SimDescription me, IMiniSimDescription actor)
{
SimDescription active = null;
if (Sim.ActiveActor != null)
{
active = Sim.ActiveActor.SimDescription;
}
return (me == active);
}
示例14: AllowSpecies
protected override bool AllowSpecies(IMiniSimDescription me)
{
if (Common.AssemblyCheck.IsInstalled("NRaasWoohooer"))
{
return true;
}
else
{
return me.IsHuman;
}
}
示例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);
}