本文整理汇总了C#中SimDescription.GetSpecialOutfit方法的典型用法代码示例。如果您正苦于以下问题:C# SimDescription.GetSpecialOutfit方法的具体用法?C# SimDescription.GetSpecialOutfit怎么用?C# SimDescription.GetSpecialOutfit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimDescription
的用法示例。
在下文中一共展示了SimDescription.GetSpecialOutfit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Transform
public static void Transform(SimDescription sim)
{
if (!Hybrid.Settings.mSpecialWerewolfOutfit) return;
SimOutfit outfit = sim.GetSpecialOutfit(sWerewolfOutfitKey);
if (outfit == null)
{
SimOutfit sourceOutfit = sim.GetOutfit(OutfitCategories.Everyday, 0);
foreach (CASPart part in sourceOutfit.Parts)
{
if (part.BodyType == BodyTypes.FullBody)
{
return;
}
}
if (sParts == null)
{
sParts = CASParts.GetParts(PartMatches);
}
List<CASParts.PartPreset> parts = new List<CASParts.PartPreset>();
foreach (CASParts.Wrapper part in sParts)
{
if (!part.ValidFor(sim)) continue;
if (RandomUtil.CoinFlip()) continue;
CASParts.PartPreset preset = part.GetRandomPreset();
if (preset == null) continue;
parts.Add(preset);
}
if (parts.Count > 0)
{
using (CASParts.OutfitBuilder builder = new CASParts.OutfitBuilder(sim, new CASParts.Key(sWerewolfOutfitKey), sourceOutfit))
{
foreach (CASParts.PartPreset part in parts)
{
builder.Builder.RemoveParts(new BodyTypes[] { part.mPart.BodyType });
builder.ApplyPartPreset(part);
}
}
}
outfit = sim.GetSpecialOutfit(sWerewolfOutfitKey);
if (outfit == null) return;
}
SwitchOutfits.SwitchNoSpin(sim.CreatedSim, new CASParts.Key(sWerewolfOutfitKey));
}