本文整理汇总了C#中IController.ViewProMotionUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# IController.ViewProMotionUpdate方法的具体用法?C# IController.ViewProMotionUpdate怎么用?C# IController.ViewProMotionUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IController
的用法示例。
在下文中一共展示了IController.ViewProMotionUpdate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScenarioControllerLoop
//.........这里部分代码省略.........
}
catch (Exception e)
{
throw new ControllerException(Fmt_ErrorMsg("CloseChatRoom", e.Message));
}
break;
case "CreateWhiteboardRoom":
try
{
string room_name = ((StringValue)vpEvent.parameters["RoomName"]).value;
string senderDM = ((StringValue)vpEvent.parameters["SenderDM_ID"]).value;
List<string> membership_list = ((StringListValue)vpEvent.parameters["MembershipList"]).strings;
if (membership_list != null)
{
if (membership_list.Contains(DDD_Global.Instance.PlayerID))
{
if (room_name != null)
{
if (room_name.Length > 0)
{
receiver.CreateWhiteboardRoom("whiteboard - " + room_name, room_name, membership_list, senderDM);
}
}
}
}
}
catch (Exception e)
{
throw new ControllerException(Fmt_ErrorMsg("CreateWhiteboardRoom", e.Message));
}
break;
case "ViewProMotionUpdate":
try
{
if (((StringValue)vpEvent.parameters["ObjectID"]).value != null)
{
_viewpro_motion_update.ObjectId = ((StringValue)vpEvent.parameters["ObjectID"]).value;
_viewpro_motion_update.HideObject = !((LocationValue)vpEvent.parameters["Location"]).exists;
_viewpro_motion_update.Icon = ((StringValue)vpEvent.parameters["IconName"]).value;
_viewpro_motion_update.IsWeapon = ((BooleanValue)vpEvent.parameters["IsWeapon"]).value;
_viewpro_motion_update.Throttle = ((DoubleValue)vpEvent.parameters["Throttle"]).value;
_viewpro_motion_update.MaxSpeed = ((DoubleValue)vpEvent.parameters["MaximumSpeed"]).value;
_viewpro_motion_update.StartX = UTM_Mapping.HorizontalMetersToPixels((float)((LocationValue)vpEvent.parameters["Location"]).X);
_viewpro_motion_update.StartY = UTM_Mapping.VerticalMetersToPixels((float)((LocationValue)vpEvent.parameters["Location"]).Y);
_viewpro_motion_update.StartZ = (int)((LocationValue)vpEvent.parameters["Location"]).Z;
if ((((LocationValue)vpEvent.parameters["DestinationLocation"]).X == 0) && (((LocationValue)vpEvent.parameters["DestinationLocation"]).Y == 0) &&
(((LocationValue)vpEvent.parameters["DestinationLocation"]).Z == 0))
{
_viewpro_motion_update.StartX = _viewpro_motion_update.DestinationX;
_viewpro_motion_update.StartY = _viewpro_motion_update.DestinationY;
_viewpro_motion_update.StartZ = _viewpro_motion_update.DestinationZ;
}
else
{
_viewpro_motion_update.DestinationX = UTM_Mapping.HorizontalMetersToPixels((float)((LocationValue)vpEvent.parameters["DestinationLocation"]).X);
_viewpro_motion_update.DestinationY = UTM_Mapping.VerticalMetersToPixels((float)((LocationValue)vpEvent.parameters["DestinationLocation"]).Y);
_viewpro_motion_update.DestinationZ = (int)((LocationValue)vpEvent.parameters["DestinationLocation"]).Z;
}
receiver.ViewProMotionUpdate(_viewpro_motion_update);
}
}
catch (Exception e)
{