本文整理汇总了C#中IScene类的典型用法代码示例。如果您正苦于以下问题:C# IScene类的具体用法?C# IScene怎么用?C# IScene使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IScene类属于命名空间,在下文中一共展示了IScene类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddRegion
public void AddRegion (IScene scene)
{
if (m_scene == null)
m_scene = scene;
scene.RegisterModuleInterface<IJ2KDecoder>(this);
}
开发者ID:HGExchange,项目名称:Aurora-Sim,代码行数:7,代码来源:J2KDecoderModule.cs
示例2: SimulationServiceInConnector
public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
base(config, server, String.Empty)
{
//IConfig serverConfig = config.Configs["SimulationService"];
//if (serverConfig == null)
// throw new Exception("No section 'SimulationService' in config file");
//string simService = serverConfig.GetString("LocalServiceModule",
// String.Empty);
//if (simService == String.Empty)
// throw new Exception("No SimulationService in config file");
//Object[] args = new Object[] { config };
m_LocalSimulationService = scene.RequestModuleInterface<ISimulationService>();
m_LocalSimulationService = m_LocalSimulationService.GetInnerService();
//ServerUtils.LoadPlugin<ISimulationService>(simService, args);
//System.Console.WriteLine("XXXXXXXXXXXXXXXXXXX m_AssetSetvice == null? " + ((m_AssetService == null) ? "yes" : "no"));
//server.AddStreamHandler(new AgentGetHandler(m_SimulationService, m_AuthenticationService));
//server.AddStreamHandler(new AgentPostHandler(m_SimulationService, m_AuthenticationService));
//server.AddStreamHandler(new AgentPutHandler(m_SimulationService, m_AuthenticationService));
//server.AddStreamHandler(new AgentDeleteHandler(m_SimulationService, m_AuthenticationService));
server.AddHTTPHandler("/agent/", new AgentHandler(m_LocalSimulationService).Handler);
server.AddHTTPHandler("/object/", new ObjectHandler(m_LocalSimulationService).Handler);
//server.AddStreamHandler(new ObjectPostHandler(m_SimulationService, authentication));
}
开发者ID:AlexRa,项目名称:opensim-mods-Alex,代码行数:28,代码来源:SimulationServiceInConnector.cs
示例3: AddRegion
public void AddRegion (IScene scene)
{
m_scene = scene;
m_scene.RegisterModuleInterface<IBuySellModule>(this);
m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
m_scene.EventManager.OnClosingClient += UnsubscribeFromClientEvents;
}
开发者ID:HGExchange,项目名称:Aurora-Sim,代码行数:7,代码来源:BuySellModule.cs
示例4: Initialise
bool m_renderMeshes = true; // true if to render meshes rather than just bounding boxes
#region IMapTileTerrainRenderer Members
public void Initialise (IScene scene, IConfigSource config)
{
m_scene = scene;
m_imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder> ();
m_config = config;
m_assetCacheDir = m_config.Configs ["AssetCache"].GetString ("CacheDirectory", m_assetCacheDir);
if (m_assetCacheDir == "") {
var defpath = scene.RequestModuleInterface<ISimulationBase> ().DefaultDataPath;
m_assetCacheDir = System.IO.Path.Combine (defpath, Constants.DEFAULT_ASSETCACHE_DIR);
}
List<string> renderers = RenderingLoader.ListRenderers (Util.ExecutingDirectory ());
if (renderers.Count > 0) {
m_primMesher = RenderingLoader.LoadRenderer (renderers [0]);
MainConsole.Instance.Debug ("[WarpTile generator]: Loaded prim mesher " + m_primMesher);
} else {
MainConsole.Instance.Info ("[WarpTile generator]: No prim mesher loaded, prim rendering will be disabled");
}
var mapConfig = m_config.Configs ["MapModule"];
if (mapConfig != null) {
m_texturePrimSize = mapConfig.GetFloat ("TexturePrimSize", m_texturePrimSize);
m_renderMeshes = mapConfig.GetBoolean ("RenderMeshes", m_renderMeshes);
}
ReadCacheMap ();
}
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:32,代码来源:WarpTileRenderer.cs
示例5: AddRegion
public void AddRegion(IScene scene)
{
m_scene = scene;
Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb);
m_graph = Graphics.FromImage(bitmap);
}
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:7,代码来源:VectorRenderModule.cs
示例6: TerrainChannel
public TerrainChannel(IScene scene)
{
m_scene = scene;
m_Width = m_scene.RegionInfo.RegionSizeX;
m_Height = m_scene.RegionInfo.RegionSizeY;
CreateDefaultTerrain(m_scene.RegionInfo.RegionTerrain);
}
开发者ID:CaseyraeStarfinder,项目名称:WhiteCore-Dev,代码行数:7,代码来源:TerrainChannel.cs
示例7: AddRegion
public void AddRegion(IScene scene)
{
scene.EventManager.OnNewClient += EventManager_OnNewClient;
scene.EventManager.OnClosingClient += EventManager_OnClosingClient;
scene.EventManager.OnNewPresence += EventManager_OnNewPresence;
scene.EventManager.OnRemovePresence += EventManager_OnRemovePresence;
}
开发者ID:VirtualReality,项目名称:Universe,代码行数:7,代码来源:SelectionModule.cs
示例8: Start
public void Start(IScene scene)
{
m_scene = scene;
m_dataStore = m_scene.Simian.GetAppModule<IDataStore>();
if (m_dataStore == null)
{
m_log.Error("LLPrimitiveLoader requires an IDataStore");
return;
}
m_primMesher = m_scene.GetSceneModule<IPrimMesher>();
if (m_primMesher == null)
{
m_log.Error("LLPrimitiveLoader requires an IPrimMesher");
return;
}
m_writeQueue = new ThrottledQueue<UUID, PrimSerialization>(5, 1000 * 30, true, SerializationHandler);
m_writeQueue.Start();
m_scene.OnEntityAddOrUpdate += EntityAddOrUpdateHandler;
m_scene.OnEntityRemove += EntityRemoveHandler;
Deserialize();
}
开发者ID:osgrid,项目名称:openmetaverse,代码行数:26,代码来源:LLPrimitiveLoader.cs
示例9: RegionLoaded
public void RegionLoaded(IScene scene)
{
if (!m_Enabled)
return;
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClosingClient -= OnClosingClient;
}
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:7,代码来源:CallingCardModule.cs
示例10: Start
public void Start(IScene scene)
{
m_scene = scene;
m_assetClient = m_scene.Simian.GetAppModule<IAssetClient>();
if (m_assetClient == null)
{
m_log.Warn("Upload requires an IAssetClient");
return;
}
m_httpServer = m_scene.Simian.GetAppModule<IHttpServer>();
if (m_httpServer == null)
{
m_log.Warn("Upload requires an IHttpServer");
return;
}
m_primMesher = m_scene.GetSceneModule<IPrimMesher>();
m_permissions = m_scene.GetSceneModule<LLPermissions>();
m_scene.Capabilities.AddProtectedResource(m_scene.ID, "UploadBakedTexture", UploadBakedTextureHandler);
m_scene.Capabilities.AddProtectedResource(m_scene.ID, "UploadBakedTextureData", UploadBakedTextureDataHandler);
m_scene.Capabilities.AddProtectedResource(m_scene.ID, "UploadObjectAsset", UploadObjectAssetHandler);
}
开发者ID:thoys,项目名称:simian,代码行数:25,代码来源:Upload.cs
示例11: RevertShadeWorld
public void RevertShadeWorld(IScene scene, string[] cmd)
{
ISceneEntity[] entities = scene.Entities.GetEntities();
foreach (ISceneEntity entity in entities)
{
foreach (ISceneChildEntity child in entity.ChildrenEntities())
{
UUID[] textures = GetTextures(child.Shape.Textures);
foreach (UUID t in textures)
{
UUID oldID = t;
AssetBase oldAsset = null;
while (m_revertConverted.ContainsKey(oldID))
{
child.Shape.Textures = SetTexture(child.Shape, m_revertConverted[oldID], oldID);
oldID = m_revertConverted[oldID];
}
UUID newID;
while ((oldAsset = scene.AssetService.Get(oldID.ToString())) != null && UUID.TryParse(oldAsset.Description, out newID))
{
child.Shape.Textures = SetTexture(child.Shape, newID, oldID);
}
}
}
}
m_revertConverted.Clear();
m_previouslyConverted.Clear();
}
开发者ID:emperorstarfinder,项目名称:My-Aurora-Sim,代码行数:29,代码来源:WorldShader.cs
示例12: FinishStartup
public void FinishStartup(IScene scene, IConfigSource source, ISimulationBase openSimBase)
{
IEstateConnector EstateConnector = Framework.Utilities.DataManager.RequestPlugin<IEstateConnector>();
if (EstateConnector != null)
{
EstateSettings ES = EstateConnector.GetEstateSettings(scene.RegionInfo.RegionID);
if (ES == null)
{
//It could not find the estate service, wait until it can find it
MainConsole.Instance.Warn(
"We could not find the estate service for this sim. Please make sure that your URLs are correct in grid mode.");
while (true)
{
MainConsole.Instance.Prompt("Press enter to try again.");
if ((ES = EstateConnector.GetEstateSettings(scene.RegionInfo.RegionID)) == null ||
ES.EstateID == 0)
{
ES = CreateEstateInfo(scene);
break;
}
if (ES != null)
break;
}
}
else if (ES.EstateID == 0)
{
//It found the estate service, but found no estates for this region, make a new one
MainConsole.Instance.Warn("[EstateInitializer]: Your region " + scene.RegionInfo.RegionName +
" is not part of an estate.");
ES = CreateEstateInfo(scene);
}
scene.RegionInfo.EstateSettings = ES;
}
}
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:35,代码来源:EstateInitializer.cs
示例13: HandleAbuseReports
protected void HandleAbuseReports(IScene scene, string [] cmd)
{
int reports;
while (!int.TryParse (MainConsole.Instance.Prompt ("Number of reports to display: ", "7"), out reports))
MainConsole.Instance.Info ("Bad input, must be a number > 0");
string abuseInfo;
abuseInfo = string.Format ("{0, -8}", "Card");
abuseInfo += string.Format ("{0, -30}", "Category");
abuseInfo += string.Format ("{0, -30}", "Summary");
abuseInfo += string.Format ("{0, -20}", "Reporter");
abuseInfo += string.Format ("{0, -20}", "Assigned");
MainConsole.Instance.CleanInfo (abuseInfo);
MainConsole.Instance.CleanInfo (
"----------------------------------------------------------------------------------------------------");
List<AbuseReport> abuseReports = abuseConnector.GetAbuseReports(0, reports, true);
foreach (AbuseReport rpt in abuseReports) {
abuseInfo = string.Format ("{0, -8}", rpt.Number);
abuseInfo += string.Format ("{0, -30}", rpt.Category.ToString().Substring(0,28));
abuseInfo += string.Format ("{0, -30}", rpt.AbuseSummary);
abuseInfo += string.Format ("{0, -20}", rpt.ReporterName);
abuseInfo += string.Format ("{0, -12}", rpt.AssignedTo);
MainConsole.Instance.CleanInfo (abuseInfo);
MainConsole.Instance.CleanInfo ("");
}
}
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:34,代码来源:AbuseReportsModule.cs
示例14: PlayScene1
public static void PlayScene1(IScene scene, string fileName, string webaddress, ISceneSerializer sceneSerializer)
{
Console.WriteLine("EndlessDialogs library demonstration");
Console.WriteLine("----------------------------");
Console.WriteLine("Example");
Console.WriteLine("1) Linear conversation");
Console.WriteLine("2) Branched conversation");
Console.WriteLine("3) Save Scene");
Console.WriteLine("4) Load Scene");
int answer = ReadAnswerNumber(1, 4);
if (answer == 1)
ConversationRunner(scene.GetConversations().First());
else if(answer == 2)
ConversationRunner(scene.GetConversations().Skip(1).ToList().First());
else if (answer == 3)
{
sceneSerializer.Serialize(scene, fileName);
Console.WriteLine("Scene saved to file: TestScene.xml");
}
else if (answer == 4)
{
IScene loadedScene = sceneSerializer.Deserialize(fileName);
Console.WriteLine("Scene loaded from file: TestScene.xml");
ConversationRunner(loadedScene.GetConversations().Skip(1).ToList().First());
}
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("----------------------------");
Console.WriteLine("More: \"" + webaddress + "\"");
Console.ReadKey();
}
开发者ID:AntonyBaasan,项目名称:endlessdialogs,代码行数:34,代码来源:Program.cs
示例15: FinishedStartup
public void FinishedStartup()
{
if (m_registry == null)
return;
ISceneManager manager = m_registry.RequestModuleInterface<ISceneManager>();
if (manager != null)
{
manager.OnAddedScene += (scene) =>
{
m_scene = scene;
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnClosingClient += OnClosingClient;
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
scene.EventManager.OnValidateBuyLand += EventManager_OnValidateBuyLand;
scene.RegisterModuleInterface<IMoneyModule>(this);
};
manager.OnCloseScene += (scene) =>
{
m_scene.EventManager.OnNewClient -= OnNewClient;
m_scene.EventManager.OnClosingClient -= OnClosingClient;
m_scene.EventManager.OnMakeRootAgent -= OnMakeRootAgent;
scene.EventManager.OnValidateBuyLand -= EventManager_OnValidateBuyLand;
m_scene.RegisterModuleInterface<IMoneyModule>(this);
m_scene = null;
};
}
if (!m_connector.DoRemoteCalls)
{
if ((m_connector.GetConfig().GiveStipends) && (m_connector.GetConfig().Stipend > 0))
new GiveStipends(m_connector.GetConfig(), m_registry, m_connector);
}
}
开发者ID:samiam123,项目名称:sam2Aurora,代码行数:33,代码来源:Simple.CurrencyModule.cs
示例16: Initialise
public void Initialise(IScene scene, IConfigSource config)
{
m_scene = scene;
m_imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
m_config = config;
ReadCacheMap();
}
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:7,代码来源:WarpTileRenderer.cs
示例17: Help
public void Help (IScene scene, string [] cmd)
{
List<string> help = m_Commands.GetHelp (cmd);
foreach (string s in help)
Output (s, Level.Off);
}
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:7,代码来源:GUIConsole.cs
示例18: AddRegion
public void AddRegion(IScene scene)
{
m_scene = scene;
m_scene.EventManager.OnNewClient += EventManager_OnNewClient;
m_scene.EventManager.OnClosingClient += EventManager_OnClosingClient;
m_scene.EventManager.OnRegisterCaps += RegisterCaps;
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:7,代码来源:SetHomeModule.cs
示例19: RemoveRegion
public void RemoveRegion(IScene scene)
{
m_scene.EventManager.OnNewClient -= OnNewClient;
m_scene.EventManager.OnClosingClient -= OnClosingClient;
m_scene.UnregisterModuleInterface<ISoundModule>(this);
}
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:7,代码来源:SoundModule.cs
示例20: RemoveScene
/// <summary>
/// Can be called from other modules.
/// </summary>
/// <param name = "scene"></param>
public void RemoveScene(IScene scene)
{
lock (m_sceneList)
{
m_sceneList.Remove(scene);
}
}
开发者ID:rjspence,项目名称:YourSim,代码行数:11,代码来源:LocalSimulationServiceConnector.cs
注:本文中的IScene类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论