• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LSL_Types.LSLFloat类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
 }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:11,代码来源:AA_API.cs


示例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);
                    }
                }
            }
        }
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:60,代码来源:OSSL_Api.cs


示例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);
        }
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:9,代码来源:Bot_API.cs


示例4: AASetCloudDensity

 public void AASetCloudDensity(LSL_Float density)
 {
     m_AA_Functions.AASetCloudDensity(density);
 }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:4,代码来源:AA_Stub.cs


示例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);
        }
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:19,代码来源:AA_API.cs


示例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);
                }
            }
        }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:15,代码来源:LSL_Api.cs


示例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);
 }
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:7,代码来源:Bot_API.cs


示例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;
        }
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:23,代码来源:OSSL_Api.cs


示例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);
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:40,代码来源:LSL_Api.cs


示例10: llWanderWithin

 public void llWanderWithin(LSL_Vector origin, LSL_Float distance, LSL_List options)
 {
     NotImplemented("llWanderWithin");
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:4,代码来源:LSL_Api.cs


示例11: llFleeFrom

 public void llFleeFrom(LSL_Vector source, LSL_Float distance, LSL_List options)
 {
     NotImplemented("llFleeFrom");
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:4,代码来源:LSL_Api.cs


示例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);
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:11,代码来源:Bot_API.cs


示例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);
            }
        }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:56,代码来源:OSSL_Api.cs


示例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.");
 }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:9,代码来源:AA_API.cs


示例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;
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:19,代码来源:AA_API.cs


示例16: 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:justasabc,项目名称:Aurora-Sim,代码行数:17,代码来源:OSSL_Api.cs


示例17: osSetWindParam

        public void osSetWindParam(string plugin, string param, LSL_Float value)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam", m_host, "OSSL", m_itemID))
                return;

            IWindModule module = World.RequestModuleInterface<IWindModule>();
            if (module != null)
            {
                try
                {
                    module.WindParamSet(plugin, param, (float) value.value);
                }
                catch (Exception)
                {
                }
            }
        }
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:17,代码来源:OSSL_Api.cs


示例18: llSetPhysicsMaterial

        public void llSetPhysicsMaterial(LSL_Integer bits, LSL_Float density, LSL_Float friction, LSL_Float restitution,
                                         LSL_Float gravityMultiplier)
        {
            ObjectFlagUpdatePacket.ExtraPhysicsBlock[] blocks = new ObjectFlagUpdatePacket.ExtraPhysicsBlock[1];
            blocks[0] = new ObjectFlagUpdatePacket.ExtraPhysicsBlock();
            if ((bits & ScriptBaseClass.DENSITY) == ScriptBaseClass.DENSITY)
                m_host.Density = (float) density;
            else
                blocks[0].Density = m_host.Density;

            if ((bits & ScriptBaseClass.FRICTION) == ScriptBaseClass.FRICTION)
                m_host.Friction = (float) friction;
            else
                blocks[0].Friction = m_host.Friction;

            if ((bits & ScriptBaseClass.RESTITUTION) == ScriptBaseClass.RESTITUTION)
                m_host.Restitution = (float) restitution;
            else
                blocks[0].Restitution = m_host.Restitution;

            if ((bits & ScriptBaseClass.GRAVITY_MULTIPLIER) == ScriptBaseClass.GRAVITY_MULTIPLIER)
                m_host.GravityMultiplier = (float) gravityMultiplier;
            else
                blocks[0].GravityMultiplier = m_host.GravityMultiplier;

            bool UsePhysics = ((m_host.Flags & PrimFlags.Physics) != 0);
            bool IsTemporary = ((m_host.Flags & PrimFlags.TemporaryOnRez) != 0);
            bool IsPhantom = ((m_host.Flags & PrimFlags.Phantom) != 0);
            bool IsVolumeDetect = m_host.VolumeDetectActive;
            blocks[0].PhysicsShapeType = m_host.PhysicsType;
            if (m_host.UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, IsVolumeDetect, blocks))
                m_host.ParentEntity.RebuildPhysicalRepresentation(true, null);
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:33,代码来源:LSL_Api.cs


示例19: AASetConeOfSilence

 public void AASetConeOfSilence(LSL_Float radius)
 {
     ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "AASetConeOfSilence", m_host, "AA");
     if(World.Permissions.IsAdministrator(m_host.OwnerID))
         m_host.SetConeOfSilence(radius.value);
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:6,代码来源:AA_API.cs


示例20: llTarget

 public LSL_Integer llTarget (LSL_Vector position, LSL_Float range)
 {
     if(!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return 0;
     
     return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
 }
开发者ID:kchi059,项目名称:Aurora-Sim,代码行数:6,代码来源:LSL_Api.cs



注:本文中的Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.LSLFloat类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LSL_Types.LSLInteger类代码示例发布时间:2022-05-24
下一篇:
C# Aura类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap