本文整理汇总了C#中AgentCircuitData类的典型用法代码示例。如果您正苦于以下问题:C#AgentCircuitData类的具体用法?C#AgentCircuitData怎么用?C#AgentCircuitData使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:CreateAgent
/**
*Agent-relatedcommunications
*/
publicboolCreateAgent(GridRegiondestination,AgentCircuitDataaCircuit,uintteleportFlags,outCreateAgentResponseresponse)
{
response=newCreateAgentResponse();
ISceneScene=destination==null?null:GetScene(destination.RegionID);
if(destination==null||Scene==null)
{
response.Reason="Givendestinationwasnull";
response.Success=false;
returnfalse;
}
if(Scene.RegionInfo.RegionID!=destination.RegionID)
{
response.Reason="Didnotfindregion"+destination.RegionName;;
response.Success=false;
returnfalse;
}
IEntityTransferModuletransferModule=Scene.RequestModuleInterface
();
if(transferModule!=null)
returntransferModule.NewUserConnection(Scene,aCircuit,teleportFlags,outresponse);
response.Reason="Didnotfindregion"+destination.RegionName;
response.Success=false;
returnfalse;
}
原文链接:http://www.jxszl.com/biancheng/C/556492.html