本文整理汇总了C#中Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLFloat类的典型用法代码示例。如果您正苦于以下问题:C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLFloat类的具体用法?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLFloat怎么用?C# Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLFloat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLFloat类属于命名空间,在下文中一共展示了Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLFloat类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: aaSetCloudDensity
public void aaSetCloudDensity(LSL_Float density)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "AASetCloudDensity", m_host, "AA", m_itemID))
return;
if (!World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false))
return;
ICloudModule CloudModule = World.RequestModuleInterface<ICloudModule>();
if (CloudModule == null)
return;
CloudModule.SetCloudDensity((float) density);
}
示例2: osReturnObjects
public void osReturnObjects(LSL_Float Parameter)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "osReturnObjects", m_host, "OSSL", m_itemID))
return;
Dictionary<UUID, List<ISceneEntity>> returns =
new Dictionary<UUID, List<ISceneEntity>>();
IParcelManagementModule parcelManagement = World.RequestModuleInterface<IParcelManagementModule>();
if (parcelManagement != null)
{
ILandObject LO = parcelManagement.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
IPrimCountModule primCountModule = World.RequestModuleInterface<IPrimCountModule>();
IPrimCounts primCounts = primCountModule.GetPrimCounts(LO.LandData.GlobalID);
if (Parameter == 0) // Owner objects
{
foreach (ISceneEntity obj in primCounts.Objects.Where(obj => obj.OwnerID == LO.LandData.OwnerID))
{
if (!returns.ContainsKey(obj.OwnerID))
returns[obj.OwnerID] =
new List<ISceneEntity>();
returns[obj.OwnerID].Add(obj);
}
}
if (Parameter == 1) //Everyone elses
{
foreach (ISceneEntity obj in primCounts.Objects.Where(obj => obj.OwnerID != LO.LandData.OwnerID &&
(obj.GroupID != LO.LandData.GroupID ||
LO.LandData.GroupID == UUID.Zero)))
{
if (!returns.ContainsKey(obj.OwnerID))
returns[obj.OwnerID] =
new List<ISceneEntity>();
returns[obj.OwnerID].Add(obj);
}
}
if (Parameter == 2) // Group
{
foreach (ISceneEntity obj in primCounts.Objects.Where(obj => obj.GroupID == LO.LandData.GroupID))
{
if (!returns.ContainsKey(obj.OwnerID))
returns[obj.OwnerID] =
new List<ISceneEntity>();
returns[obj.OwnerID].Add(obj);
}
}
foreach (List<ISceneEntity> ol in returns.Values)
{
if (World.Permissions.CanReturnObjects(LO, m_host.OwnerID, ol))
{
ILLClientInventory inventoryModule = World.RequestModuleInterface<ILLClientInventory>();
if (inventoryModule != null)
inventoryModule.ReturnObjects(ol.ToArray(), m_host.OwnerID);
}
}
}
}
示例3: botSetSpeed
public void botSetSpeed(LSL_Key bot, LSL_Float SpeedModifier)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "botSetSpeed", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
manager.SetSpeed(UUID.Parse(bot), m_host.OwnerID, (float)SpeedModifier);
}
示例4: AASetCloudDensity
public void AASetCloudDensity(LSL_Float density)
{
m_AA_Functions.AASetCloudDensity(density);
}
示例5: aaSayDistance
public void aaSayDistance(int channelID, LSL_Float Distance, string text)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.VeryLow, "AASayDistance", m_host, "AA", m_itemID))
return;
if (text.Length > 1023)
text = text.Substring(0, 1023);
IChatModule chatModule = World.RequestModuleInterface<IChatModule>();
if (chatModule != null)
chatModule.SimChat(text, ChatTypeEnum.Custom, channelID,
m_host.ParentEntity.RootChild.AbsolutePosition, m_host.Name,
m_host.UUID, false, false, (float) Distance.value, UUID.Zero, World);
IWorldComm wComm = World.RequestModuleInterface<IWorldComm>();
if (wComm != null)
wComm.DeliverMessage(ChatTypeEnum.Custom, channelID, m_host.Name, m_host.UUID, text,
(float) Distance.value);
}
示例6: llSetVehicleFloatParam
//CFK 9/28: Most, but not all of the underlying plumbing between here and the physics modules is in
//CFK 9/28: so these are not complete yet.
public void llSetVehicleFloatParam(int param, LSL_Float value)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL");
if (m_host.ParentGroup != null)
{
if (!m_host.ParentGroup.IsDeleted)
{
m_host.ParentGroup.RootPart.SetVehicleFloatParam(param, (float)value);
}
}
}
示例7: botFollowAvatar
public void botFollowAvatar (string bot, string avatarName, LSL_Float startFollowDistance, LSL_Float endFollowDistance)
{
ScriptProtection.CheckThreatLevel (ThreatLevel.Moderate, "botFollowAvatar", m_host, "bot");
IBotManager manager = World.RequestModuleInterface<IBotManager> ();
if (manager != null)
manager.FollowAvatar (UUID.Parse (bot), avatarName, (float)startFollowDistance, (float)endFollowDistance);
}
示例8: osGetHealth
public LSL_Float osGetHealth(string avatar)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osGetHealth", m_host, "OSSL", m_itemID))
return new LSL_Float();
UUID avatarId = new UUID(avatar);
LSL_Float health = new LSL_Float(-1);
IScenePresence presence = World.GetScenePresence(avatarId);
Vector3 pos = m_host.GetWorldPosition();
IParcelManagementModule parcelManagement = World.RequestModuleInterface<IParcelManagementModule>();
if (parcelManagement != null)
{
LandData land = parcelManagement.GetLandObject(pos.X, pos.Y).LandData;
if ((land.Flags & (uint) ParcelFlags.AllowDamage) == (uint) ParcelFlags.AllowDamage)
{
ICombatPresence cp = presence.RequestModuleInterface<ICombatPresence>();
health = cp.Health;
}
}
return health;
}
示例9: LSL_Rotation
/* The new / changed functions were tested with the following LSL script:
default
{
state_entry()
{
rotation rot = llEuler2Rot(<0,70,0> * DEG_TO_RAD);
llOwnerSay("to get here, we rotate over: "+ (string) llRot2Axis(rot));
llOwnerSay("and we rotate for: "+ (llRot2Angle(rot) * RAD_TO_DEG));
// convert back and forth between quaternion <-> vector and angle
rotation newrot = llAxisAngle2Rot(llRot2Axis(rot),llRot2Angle(rot));
llOwnerSay("Old rotation was: "+(string) rot);
llOwnerSay("re-converted rotation is: "+(string) newrot);
llSetRot(rot); // to check the parameters in the prim
}
}
*/
// Xantor 29/apr/2008
// Returns rotation described by rotating angle radians about axis.
// q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2))
public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, LSL_Float angle)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID))
return new LSL_Rotation();
double s = Math.Cos(angle*0.5);
double t = Math.Sin(angle*0.5);
double x = axis.x*t;
double y = axis.y*t;
double z = axis.z*t;
return new LSL_Rotation(x, y, z, s);
}
示例10: llWanderWithin
public void llWanderWithin(LSL_Vector origin, LSL_Float distance, LSL_List options)
{
NotImplemented("llWanderWithin");
}
示例11: llFleeFrom
public void llFleeFrom(LSL_Vector source, LSL_Float distance, LSL_List options)
{
NotImplemented("llFleeFrom");
}
示例12: botFollowAvatar
public void botFollowAvatar(string bot, string avatarName, LSL_Float startFollowDistance,
LSL_Float endFollowDistance)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "botFollowAvatar", m_host, "bot", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
manager.FollowAvatar(UUID.Parse(bot), avatarName, (float) startFollowDistance, (float) endFollowDistance,
false, Vector3.Zero,
m_host.OwnerID);
}
示例13: osReturnObjects
public void osReturnObjects(LSL_Float Parameter)
{
ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "osShutDown", m_host, "OSSL");
Dictionary<UUID, List<SceneObjectGroup>> returns =
new Dictionary<UUID, List<SceneObjectGroup>>();
ILandObject LO = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
if (Parameter == 0) // Owner objects
{
foreach (SceneObjectGroup obj in LO.PrimsOverMe)
{
if (obj.OwnerID == LO.LandData.OwnerID)
{
if (!returns.ContainsKey(obj.OwnerID))
returns[obj.OwnerID] =
new List<SceneObjectGroup>();
returns[obj.OwnerID].Add(obj);
}
}
}
if (Parameter == 1) //Everyone elses
{
foreach (SceneObjectGroup obj in LO.PrimsOverMe)
{
if (obj.OwnerID != LO.LandData.OwnerID &&
(obj.GroupID != LO.LandData.GroupID ||
LO.LandData.GroupID == UUID.Zero))
{
if (!returns.ContainsKey(obj.OwnerID))
returns[obj.OwnerID] =
new List<SceneObjectGroup>();
returns[obj.OwnerID].Add(obj);
}
}
}
if (Parameter == 2) // Group
{
foreach (SceneObjectGroup obj in LO.PrimsOverMe)
{
if (obj.GroupID == LO.LandData.GroupID)
{
if (!returns.ContainsKey(obj.OwnerID))
returns[obj.OwnerID] =
new List<SceneObjectGroup>();
returns[obj.OwnerID].Add(obj);
}
}
}
foreach (List<SceneObjectGroup> ol in returns.Values)
{
if (World.Permissions.CanReturnObjects(LO, m_host.OwnerID, ol))
World.returnObjects(ol.ToArray(), m_host.OwnerID);
}
}
示例14: aaSetConeOfSilence
public void aaSetConeOfSilence(LSL_Float radius)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "aaSetConeOfSilence", m_host, "AA", m_itemID))
return;
if (World.Permissions.IsGod(m_host.OwnerID))
m_host.SetConeOfSilence(radius.value);
else
ShoutError("You do not have god permissions here.");
}
示例15: aaWindlightAddDayCycleFrame
public LSL_Integer aaWindlightAddDayCycleFrame(LSL_Float dayCyclePosition, int dayCycleFrameToCopy)
{
IGenericsConnector gc = DataManager.DataManager.RequestPlugin<IGenericsConnector>();
OSDWrapper d = gc.GetGeneric<OSDWrapper>(World.RegionInfo.RegionID, "EnvironmentSettings", "");
if (d != null)
{
WindlightDayCycle cycle = new WindlightDayCycle();
cycle.FromOSD(d.Info);
if (cycle.Cycle.IsStaticDayCycle || dayCycleFrameToCopy >= cycle.Cycle.DataSettings.Count)
return LSL_Integer.FALSE;
var data = cycle.Cycle.DataSettings.Keys.ToList();
cycle.Cycle.DataSettings.Add(dayCyclePosition.ToString(), cycle.Cycle.DataSettings[data[dayCycleFrameToCopy]]);
gc.AddGeneric(World.RegionInfo.RegionID, "EnvironmentSettings", "", new OSDWrapper { Info = cycle.ToOSD() }.ToOSD());
return LSL_Integer.TRUE;
}
return LSL_Integer.FALSE;
}