本文整理汇总了C#中GameObjects.Person.Identity方法的典型用法代码示例。如果您正苦于以下问题:C# Person.Identity方法的具体用法?C# Person.Identity怎么用?C# Person.Identity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObjects.Person
的用法示例。
在下文中一共展示了Person.Identity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: challengePersonString
private string challengePersonString(Person person)
{
//武将ID,姓,名,字,性别(0,女、1,男),头像编号,身份(0 盗贼,1 武将,2君主)
//生命,体力,力量,敏捷,
//武艺,统御,智谋,政治,魅力,
//相性,勇猛,冷静,义理,野心,名声,
//坐骑(1、没有马;300、赤兔马;301、的卢;302、绝影;303、爪黄飞电;304、大宛马),
//忠诚度,当前所属势力声望,
//当前效力君主的魅力(没有君主传-1),当前效力君主的相性(没有君主传-1)
string para;
para = person.ID.ToString() + "," + person.SurName + "," + person.GivenName + "," + (person.CalledName == "" ? "无" : person.CalledName) + "," + (person.Sex ? "0" : "1") + "," + person.PictureIndex.ToString() + ","+person.Identity().ToString()+",";
para += person.Strength.ToString() + "," + person.Strength.ToString() + "," + person.Strength.ToString() + "," + person.Strength.ToString() + ",";
para += person.Strength.ToString() + "," + person.Command.ToString() + "," + person.Intelligence.ToString() + "," + person.Politics.ToString() + "," + person.Glamour.ToString() + ",";
para += person.Ideal.ToString() + "," + person.Braveness.ToString() + "," + person.Calmness.ToString() + "," + person.PersonalLoyalty.ToString() + "," + person.Ambition.ToString() + "," + person.Reputation.ToString() + ",";
///////////////////////////////判断有没有宝物马
if (person.HasHorse() == -1) //游戏中用-1表示没有马,而单挑程序中用1表示没有马
{
para += "1" + ",";
}
else
{
para += person.HasHorse().ToString() + ",";
}
/////////////////////////////////
para += person.Loyalty.ToString() + "," + (person.BelongedFaction == null ? 0 : person.BelongedFaction.Reputation).ToString()+",";
para += (person.BelongedFaction == null ? -1 : person.BelongedFaction.Leader.Glamour).ToString() + "," + (person.BelongedFaction == null ? -1 : person.BelongedFaction.Leader.Ideal).ToString();
para += "\r\n";
return para;
}