本文整理汇总了C#中WorldServer.player.Player.setRunEnergyLoad方法的典型用法代码示例。如果您正苦于以下问题:C# Player.setRunEnergyLoad方法的具体用法?C# Player.setRunEnergyLoad怎么用?C# Player.setRunEnergyLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldServer.player.Player
的用法示例。
在下文中一共展示了Player.setRunEnergyLoad方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadPlayer
//.........这里部分代码省略.........
if (!int.TryParse(element.InnerText, out temp)) {
createdPlayer.setLocation(Constants.HOME_SPAWN_LOCATION);
break;
}
location.setX(temp);
break;
case "Y":
if (!int.TryParse(element.InnerText, out temp)) {
createdPlayer.setLocation(Constants.HOME_SPAWN_LOCATION);
break;
}
location.setY(temp);
break;
case "Z":
if (!int.TryParse(element.InnerText, out temp))
temp = 0;
location.setZ(temp);
break;
}
}
createdPlayer.setLocation(location);
if (Location.atDuelArena(createdPlayer.getLocation()))
DuelSession.teleportDuelArenaHome(createdPlayer);
}
xmlNode = xmlDocument.SelectSingleNode("/Player/Settings/RunEnergy");
if (xmlNode == null)
{
temp = 100;
} else {
if (!int.TryParse(xmlNode.InnerText, out temp))
temp = 100;
}
createdPlayer.setRunEnergyLoad(temp);
loginElement = xmlDocument.SelectSingleNode("/Player/Settings/PrivacySettings");
if (loginElement != null && loginElement.HasChildNodes)
{
XmlNodeList childs = loginElement.ChildNodes;
Friends.STATUS publicStatus = Friends.STATUS.ON, privateStatus = Friends.STATUS.ON, tradeStatus = Friends.STATUS.ON;
foreach (XmlElement element in childs)
{
switch (element.Name)
{
case "Public":
publicStatus = (Friends.STATUS)Enum.Parse(typeof(Friends.STATUS), element.InnerText, true);
break;
case "Private":
privateStatus = (Friends.STATUS)Enum.Parse(typeof(Friends.STATUS), element.InnerText, true);
break;
case "Trade":
tradeStatus = (Friends.STATUS) Enum.Parse(typeof(Friends.STATUS), element.InnerText, true);
break;
}
}
createdPlayer.getFriends().setPrivacyOptions(publicStatus, privateStatus, tradeStatus);
}
loginElement = xmlDocument.SelectSingleNode("/Player/Friends");
if (loginElement != null && loginElement.HasChildNodes)
{
XmlNodeList childs = loginElement.ChildNodes; //number of Friends
foreach (XmlElement element in childs)
{