当前位置: 首页>>代码示例>>C#>>正文


C# Person.HasHorse方法代码示例

本文整理汇总了C#中GameObjects.Person.HasHorse方法的典型用法代码示例。如果您正苦于以下问题:C# Person.HasHorse方法的具体用法?C# Person.HasHorse怎么用?C# Person.HasHorse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameObjects.Person的用法示例。


在下文中一共展示了Person.HasHorse方法的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;
        }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:31,代码来源:Challenge.cs


注:本文中的GameObjects.Person.HasHorse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。