本文整理汇总了C#中PlayerCharacter.LocationChangeLocation方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerCharacter.LocationChangeLocation方法的具体用法?C# PlayerCharacter.LocationChangeLocation怎么用?C# PlayerCharacter.LocationChangeLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerCharacter
的用法示例。
在下文中一共展示了PlayerCharacter.LocationChangeLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: handleUseMapObject
// TODO: Temporary implemenation. Must use sripting/configuration external to server for handling actions connected with map objects usage
// TODO: Add checking distance from object. Execute only if close enough
// TODO: If change map fails and player move to IP, display massage and stop script
private void handleUseMapObject(PlayerCharacter pc, IncommingMessage msg)
{
if (pc.LoginState == PlayerCharacterLoginState.LoginSuccesfull)
{
UseMapObjectIncommingMessage msgUseMapObject = (UseMapObjectIncommingMessage)msg;
// Right now only handling for changing IP and IP insides maps!!!
switch (pc.LocationCurrentMap.Name)
{
case ("calindor_startmap.elm"):
{
switch (msgUseMapObject.TargetObjectID)
{
case(78):
{
pc.LocationChangeLocation(118, 35);
break;
}
}
break;
}
/*case ("startmap.elm"):
{
switch (msgUseMapObject.TargetObjectID)
{
case (501): // Secret location
{
RawTextOutgoingMessage msgToSender =
(RawTextOutgoingMessage)OutgoingMessagesFactory.Create(OutgoingMessageType.RAW_TEXT);
msgToSender.Color = PredefinedColor.Blue1;
msgToSender.Channel = PredefinedChannel.CHAT_LOCAL;
msgToSender.Text = "The world blurs... and you are taken to a place you didn't expect...";
pc.PutMessageIntoMyQueue(msgToSender);
pc.LocationChangeMap("cont2map5_insides.elm",606,133);
break;
}
case (520): // Movement to WS
{
RawTextOutgoingMessage msgToSender =
(RawTextOutgoingMessage)OutgoingMessagesFactory.Create(OutgoingMessageType.RAW_TEXT);
msgToSender.Color = PredefinedColor.Blue1;
msgToSender.Channel = PredefinedChannel.CHAT_LOCAL;
msgToSender.Text = "This land seems deserted and dead...";
pc.PutMessageIntoMyQueue(msgToSender);
pc.LocationChangeMap("map2.elm", 707, 162);
break;
}
case (1137): // IP cave
{
pc.LocationChangeMap("misc1.elm", 60, 138);
break;
}
case (73): // IP House, near veggies
{
pc.LocationChangeMap("startmap_insides.elm", 57, 13);
break;
}
case (63): // IP House, grandma
{
pc.LocationChangeMap("startmap_insides.elm", 15, 55);
break;
}
case (72): // IP Tavern
{
pc.LocationChangeMap("startmap_insides.elm", 18, 13);
break;
}
case (193): // IP hause - locked
{
RawTextOutgoingMessage msgToSender =
(RawTextOutgoingMessage)OutgoingMessagesFactory.Create(OutgoingMessageType.RAW_TEXT);
msgToSender.Color = PredefinedColor.Blue1;
msgToSender.Channel = PredefinedChannel.CHAT_LOCAL;
msgToSender.Text = "You hear strange noises as you approach... and the doors are locked...";
pc.PutMessageIntoMyQueue(msgToSender);
break;
}
case (97): // IP hause - south of closed hause
{
pc.LocationChangeMap("startmap_insides.elm", 52, 49);
break;
}
case (1023): // IP tower
{
pc.LocationChangeMap("map7_insides.elm", 19, 66);
break;
}
default:
break;
}
break;
}
case ("startmap_insides.elm"):
{
//.........这里部分代码省略.........