本文整理汇总了C#中ProtoCrewMember.ChangeName方法的典型用法代码示例。如果您正苦于以下问题:C# ProtoCrewMember.ChangeName方法的具体用法?C# ProtoCrewMember.ChangeName怎么用?C# ProtoCrewMember.ChangeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProtoCrewMember
的用法示例。
在下文中一共展示了ProtoCrewMember.ChangeName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateKerbal
public void GenerateKerbal()
{
_pcm = HighLogic.CurrentGame.CrewRoster.GetNewKerbal(kerbalType);
_pcm.gender = gender;
_pcm.ChangeName(name);
_pcm.trait = experienceTrait;
KerbalRoster.SetExperienceTrait(_pcm, experienceTrait);
}
示例2: SpawnKerbal
//Gets a new kerbal and sets his/her stats based on whether there is already a Kerbal of that name or not, or if the person wants o override that check
private void SpawnKerbal(int count, bool overrideState)
{
if (exists && overrideState == false) {
warningState = true;
} else {
newKerbal = HighLogic.CurrentGame.CrewRoster.GetNewKerbal ();
newKerbal.ChangeName(stringToEdit);
newKerbal.courage = sliderValue;
newKerbal.stupidity = sliderValue2;
newKerbal.isBadass = buttonState;
newKerbal.veteran = veteran;
KerbalRoster.SetExperienceTrait (newKerbal, Trait);
//Find out and set the gender
if (male == false) {
newKerbal.gender = ProtoCrewMember.Gender.Female;
}
if (male) {
newKerbal.gender = ProtoCrewMember.Gender.Male;
}
if (closeOnComplete) {
appLauncherButton.SetFalse (true);
ScreenMessages.PostScreenMessage ("Kustom Kerbal Spawned, closing window...", 1, ScreenMessageStyle.UPPER_CENTER);
} else {
ScreenMessages.PostScreenMessage ("Kustom Kerbal Spawned.", 1, ScreenMessageStyle.UPPER_CENTER);
}
}
}