本文整理汇总了C#中Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类的典型用法代码示例。如果您正苦于以下问题:C# Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类的具体用法?C# Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString怎么用?C# Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类属于命名空间,在下文中一共展示了Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: aaUpdateDatabase
public void aaUpdateDatabase (LSL_String key, LSL_String value, LSL_String token)
{
if (!ScriptProtection.CheckThreatLevel (ThreatLevel.Moderate, "aaUpdateDatabase", m_host, "AA", m_itemID))
return;
AssetConnector.UpdateLSLData (token.m_string, key.m_string, value.m_string);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:7,代码来源:AA_API.cs
示例2: osSetTerrainTexture
/// <summary>
/// Sets terrain estate texture
/// </summary>
/// <param name="level"></param>
/// <param name="texture"></param>
/// <returns></returns>
public void osSetTerrainTexture(int level, LSL_Key texture)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osSetParcelDetails", m_host, "OSSL", m_itemID))
return;
//Check to make sure that the script's owner is the estate manager/master
//World.Permissions.GenericEstatePermission(
if (World.Permissions.IsGod(m_host.OwnerID))
{
if (level < 0 || level > 3)
return;
UUID textureID = new UUID();
if (!UUID.TryParse(texture, out textureID))
return;
// estate module is required
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
if (estate != null)
estate.setEstateTerrainBaseTexture(level, textureID);
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:26,代码来源:OS_Api.cs
示例3: osNpcStopAnimation
public void osNpcStopAnimation(LSL_Key npc, string animation)
{
if (!ScriptProtection.CheckThreatLevel (ThreatLevel.High, "osNpcStopAnimation", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (UUID.TryParse (npc.m_string, out npcId))
{
if (manager.CheckPermission (npcId, m_host.OwnerID))
osAvatarStopAnimation (npcId.ToString (), animation);
}
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:16,代码来源:OS_Api.cs
示例4: osNpcSit
public void osNpcSit(LSL_Key npc, LSL_Key target, int options)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcSit", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (UUID.TryParse (npc.m_string, out npcId))
{
if (!manager.CheckPermission (npcId, m_host.OwnerID))
return;
IScenePresence sp = World.GetScenePresence (npcId);
if (sp == null)
return;
var sitObjectID = UUID.Parse (target.m_string);
ISceneChildEntity child = World.GetSceneObjectPart (sitObjectID);
if (child == null)
//throw new Exception("Failed to find entity to sit on");
return;
sp.HandleAgentRequestSit (sp.ControllingClient, sitObjectID, new Vector3 (0,0,0));
}
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:29,代码来源:OS_Api.cs
示例5: osNpcSay
public void osNpcSay(LSL_Key npc, string message)
{
osNpcSay(npc, 0, message);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:4,代码来源:OS_Api.cs
示例6: osNpcStopMoveToTarget
public void osNpcStopMoveToTarget(LSL_Key npc)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse(npc.m_string, out npcId))
return;
//manager.StopMoveToTarget(npcId, World, m_host.OwnerID);
manager.StopMoving (npcId, m_host.OwnerID);
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:16,代码来源:OS_Api.cs
示例7: osNpcMoveTo
public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse(npc.m_string, out npcId))
return;
manager.WalkTo(npcId, pos.ToVector3(), m_host.OwnerID);
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:15,代码来源:OS_Api.cs
示例8: osNpcGetOwner
public LSL_Key osNpcGetOwner(LSL_Key npc)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcGetOwner", m_host, "OSSL", m_itemID))
return "";
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (UUID.TryParse(npc.m_string, out npcId))
{
UUID owner = manager.GetOwner(npcId);
if (owner != UUID.Zero)
return new LSL_Key(owner.ToString());
return npc;
}
}
return new LSL_Key(UUID.Zero.ToString());
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:21,代码来源:OS_Api.cs
示例9: osSetPrimitiveParams
public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams", m_host, "OSSL", m_itemID))
return;
InitLSL();
m_LSL_Api.SetPrimitiveParamsEx(prim, rules);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:8,代码来源:OS_Api.cs
示例10: osGetPrimitiveParams
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams", m_host, "OSSL", m_itemID))
return new LSL_List();
InitLSL();
return m_LSL_Api.GetLinkPrimitiveParamsEx(prim, rules);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:8,代码来源:OS_Api.cs
示例11: osKickAvatar
public void osKickAvatar(LSL_String FirstName, LSL_String SurName, LSL_String alert)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar", m_host, "OSSL", m_itemID))
return;
World.ForEachScenePresence(delegate(IScenePresence sp)
{
if (!sp.IsChildAgent &&
sp.Name == FirstName + " " + SurName)
{
// kick client...
sp.ControllingClient.Kick(alert);
// ...and close on our side
IEntityTransferModule transferModule =
sp.Scene.RequestModuleInterface<IEntityTransferModule>();
if (transferModule != null)
transferModule.IncomingCloseAgent(sp.Scene, sp.UUID);
}
});
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:21,代码来源:OS_Api.cs
示例12: osSetSpeed
public void osSetSpeed(LSL_Key UUID, LSL_Float SpeedModifier)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed", m_host, "OSSL", m_itemID))
return;
IScenePresence avatar = World.GetScenePresence(UUID);
if (avatar != null)
{
if (avatar.UUID != m_host.OwnerID)
{
//We need to make sure that they can do this then
if (!World.Permissions.IsGod(m_host.OwnerID))
return;
}
avatar.SpeedModifier = (float) SpeedModifier;
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:17,代码来源:OS_Api.cs
示例13: SaveAppearanceToNotecard
protected LSL_Key SaveAppearanceToNotecard(LSL_Key rawAvatarId, string notecard)
{
UUID avatarId;
if (!UUID.TryParse(rawAvatarId, out avatarId))
return new LSL_Key(UUID.Zero.ToString());
return SaveAppearanceToNotecard(avatarId, notecard);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:8,代码来源:OS_Api.cs
示例14: osAgentSaveAppearance
public LSL_Key osAgentSaveAppearance(LSL_Key avatarId, string notecard)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osAgentSaveAppearance", m_host, "OSSL", m_itemID))
return new LSL_Key();
return SaveAppearanceToNotecard(avatarId, notecard);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:7,代码来源:OS_Api.cs
示例15: osMessageObject
// send a message to to object identified by the given UUID, a script in the object must implement the dataserver function
// the dataserver function is passed the ID of the calling function and a string message
public void osMessageObject(LSL_Key objectUUID, string message)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "osMessageObject", m_host, "OSSL", m_itemID))
return;
object[] resobj = new object[] {new LSL_Key(m_host.UUID.ToString()), new LSL_Key(message)};
ISceneChildEntity sceneOP = World.GetSceneObjectPart(objectUUID);
m_ScriptEngine.PostObjectEvent(sceneOP.UUID, "dataserver", resobj);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:13,代码来源:OS_Api.cs
示例16: osNpcSaveAppearance
/// <summary>
/// Save the current appearance of the NPC permanently to the named notecard.
/// </summary>
/// <param name="npc"></param>
/// <param name="notecard">The name of the notecard to which to save the appearance.</param>
/// <returns>The asset ID of the notecard saved.</returns>
public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance", m_host, "OSSL", m_itemID))
return "";
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse(npc.m_string, out npcId))
return new LSL_Key(UUID.Zero.ToString());
if (!manager.CheckPermission(npcId, m_host.OwnerID))
return new LSL_Key(UUID.Zero.ToString());
return SaveAppearanceToNotecard(npcId, notecard);
}
return new LSL_Key(UUID.Zero.ToString());
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:26,代码来源:OS_Api.cs
示例17: osNpcLoadAppearance
public void osNpcLoadAppearance(LSL_Key npc, string notecard)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse(npc.m_string, out npcId))
return;
if (!manager.CheckPermission(npcId, m_host.OwnerID))
return;
string appearanceSerialized = LoadNotecard(notecard);
if (appearanceSerialized == null)
OSSLError(string.Format("osNpcCreate: Notecard reference '{0}' not found.", notecard));
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized);
AvatarAppearance appearance = new AvatarAppearance();
appearance.Unpack(appearanceOsd);
manager.SetAvatarAppearance(npcId, appearance, m_host.ParentEntity.Scene);
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:27,代码来源:OS_Api.cs
示例18: osSetProjectionParams
/// <summary>
/// Set parameters for light projection in host prim
/// </summary>
public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams", m_host, "OSSL", m_itemID))
return;
osSetProjectionParams(UUID.Zero.ToString(), projection, texture, fov, focus, amb);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:10,代码来源:OS_Api.cs
示例19: osNpcGetPos
public LSL_Vector osNpcGetPos(LSL_Key npc)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcGetPos", m_host, "OSSL", m_itemID))
return new LSL_Vector(0, 0, 0);
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse (npc.m_string, out npcId))
{
var pos = manager.GetPosition (npcId, m_host.OwnerID);
return new LSL_Vector (pos);
}
}
return new LSL_Vector(0, 0, 0);
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:19,代码来源:OS_Api.cs
示例20: osNpcMoveToTarget
public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse(npc.m_string, out npcId))
return;
Vector3 targetPos = target.ToVector3();
MainConsole.Instance.DebugFormat ("NPC: {0} moving to position: {1}, region: {2}, Options: {3}",
npcId, targetPos, World, options);
manager.MoveToTarget(
npcId,
targetPos,
options,
m_host.OwnerID
);
}
}
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:25,代码来源:OS_Api.cs
注:本文中的Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论