本文整理汇总了C#中IController.ViewProInitializeUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# IController.ViewProInitializeUpdate方法的具体用法?C# IController.ViewProInitializeUpdate怎么用?C# IController.ViewProInitializeUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IController
的用法示例。
在下文中一共展示了IController.ViewProInitializeUpdate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScenarioControllerLoop
//.........这里部分代码省略.........
_viewpro_motion_update.DestinationZ = (int)((LocationValue)vpEvent.parameters["DestinationLocation"]).Z;
}
receiver.ViewProMotionUpdate(_viewpro_motion_update);
}
}
catch (Exception e)
{
throw new ControllerException(Fmt_ErrorMsg("ViewProMotionUpdate", e.Message));
}
break;
case "ViewProInitializeObject":
try
{
if (((StringValue)vpEvent.parameters["ObjectID"]).value != null)
{
_viewpro_motion_update.ObjectId = ((StringValue)vpEvent.parameters["ObjectID"]).value;
_viewpro_motion_update.PlayerId = ((StringValue)vpEvent.parameters["TargetPlayer"]).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.OwnerID = ((StringValue)vpEvent.parameters["OwnerID"]).value;
_viewpro_motion_update.PlayerColor = ((IntegerValue)vpEvent.parameters["LabelColor"]).value;
if (_viewpro_motion_update.PlayerId == DDD_Global.Instance.PlayerID)
{
_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;
receiver.ViewProInitializeUpdate(_viewpro_motion_update);
}
}
}
catch (Exception e)
{
throw new ControllerException(Fmt_ErrorMsg("ViewProInitializeObject", e.Message + e.StackTrace));
}
break;
case "ViewProActiveRegionUpdate":
try
{
string ObjectId = ((StringValue)vpEvent.parameters["ObjectID"]).value;
if (ObjectId != null)
{
int color = ((IntegerValue)vpEvent.parameters["DisplayColor"]).value;
bool visible = ((BooleanValue)vpEvent.parameters["IsVisible"]).value;
List<PolygonValue.PolygonPoint> points = ((PolygonValue)vpEvent.parameters["Shape"]).points;
List<CustomVertex.TransformedColored> pointlist = new List<CustomVertex.TransformedColored>();
foreach (PolygonValue.PolygonPoint point in points)
{
pointlist.Add(new CustomVertex.TransformedColored(UTM_Mapping.HorizontalMetersToPixels((float)point.X), UTM_Mapping.VerticalMetersToPixels((float)point.Y), 1f, 1, color));
}
receiver.ActiveRegionUpdate(ObjectId, visible, color, pointlist);
}
}
catch (Exception e)
{
throw new ControllerException(Fmt_ErrorMsg("ViewProActiveRegionUpdate", e.Message + e.StackTrace));
}
break;