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

C# LSL_Types.LSLFloat类代码示例

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

本文整理汇总了C#中OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat的典型用法代码示例。如果您正苦于以下问题:C# OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat类的具体用法?C# OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat怎么用?C# OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat类属于命名空间,在下文中一共展示了OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: osGetHealRate

        public LSL_Float osGetHealRate(string avatar)
        {
            CheckThreatLevel(ThreatLevel.None, "osGetHealRate");
            m_host.AddScriptLPS(1);

            LSL_Float rate = new LSL_Float(0);
            ScenePresence presence = World.GetScenePresence(new UUID(avatar));
            if (presence != null)
                rate = presence.HealRate;
            return rate;
        }
开发者ID:nebadon2025,项目名称:opensimulator,代码行数:11,代码来源:OSSL_Api.cs


示例2: modInvokeL

        public LSL_List modInvokeL(string fname, params object[] parms)
        {
            Type returntype = m_comms.LookupReturnType(fname);
            if (returntype != typeof(object[]))
                MODError(String.Format("return type mismatch for {0}",fname));

            object[] result = (object[])modInvoke(fname,parms);
            object[] llist = new object[result.Length];
            for (int i = 0; i < result.Length; i++)
            {
                if (result[i] is string)
                {
                    llist[i] = new LSL_String((string)result[i]);
                }
                else if (result[i] is int)
                {
                    llist[i] = new LSL_Integer((int)result[i]);
                }
                else if (result[i] is float)
                {
                    llist[i] = new LSL_Float((float)result[i]);
                }
                else if (result[i] is UUID)
                {
                    llist[i] = new LSL_Key(result[i].ToString());
                }
                else if (result[i] is OpenMetaverse.Vector3)
                {
                    OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i];
                    llist[i] = new LSL_Vector(vresult.X, vresult.Y, vresult.Z);
                }
                else if (result[i] is OpenMetaverse.Quaternion)
                {
                    OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i];
                    llist[i] = new LSL_Rotation(qresult.X, qresult.Y, qresult.Z, qresult.W);
                }
                else
                {
                    MODError(String.Format("unknown list element {1} returned by {0}", fname, result[i].GetType().Name));
                }
            }

            return new LSL_List(llist);
        }
开发者ID:p07r0457,项目名称:opensim,代码行数:44,代码来源:MOD_Api.cs


示例3: osSetSpeed

        public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
        {
            CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
            m_host.AddScriptLPS(1);
            ScenePresence avatar = World.GetScenePresence(new UUID(UUID));

            if (avatar != null)
                avatar.SpeedModifier = (float)SpeedModifier;
        }
开发者ID:nebadon2025,项目名称:opensimulator,代码行数:9,代码来源:OSSL_Api.cs


示例4: osGetHealth

        public LSL_Float osGetHealth(string avatar)
        {
            CheckThreatLevel(ThreatLevel.None, "osGetHealth");
            m_host.AddScriptLPS(1);

            LSL_Float health = new LSL_Float(-1);
            ScenePresence presence = World.GetScenePresence(new UUID(avatar));
            if (presence != null) health = presence.Health;
            return health;
        }
开发者ID:nebadon2025,项目名称:opensimulator,代码行数:10,代码来源:OSSL_Api.cs


示例5: 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)
        {
            m_host.AddScriptLPS(1);

            if (!m_host.ParentGroup.IsDeleted)
            {
                m_host.ParentGroup.RootPart.SetVehicleFloatParam(param, (float)value);
            }
        }
开发者ID:OpenPlex-Sim,项目名称:opensim,代码行数:11,代码来源:LSL_Api.cs


示例6: osSetWindParam

        public void osSetWindParam(string plugin, string param, LSL_Float value)
        {
            CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam");
            m_host.AddScriptLPS(1);

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


示例7: osSetSpeed

 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
 {
     m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
 }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:4,代码来源:OSSL_Stub.cs


示例8: llSetVehicleFloatParam

 public void llSetVehicleFloatParam(int param, LSL_Float value)
 {
     m_LSL_Functions.llSetVehicleFloatParam(param, value);
 }
开发者ID:p07r0457,项目名称:opensim,代码行数:4,代码来源:LSL_Stub.cs


示例9: osSetWindParam

 public void osSetWindParam(string plugin, string param, LSL_Float value)
 {
     m_OSSL_Functions.osSetWindParam(plugin, param, value);
 }
开发者ID:emperorstarfinder,项目名称:Opensim2,代码行数:4,代码来源:OSSL_Stub.cs


示例10: llGetObjectDetails

        public LSL_List llGetObjectDetails(string id, LSL_List args)
        {
            m_host.AddScriptLPS(1);

            LSL_List ret = new LSL_List();
            UUID key = new UUID();
            if (UUID.TryParse(id, out key))
            {
                ScenePresence av = World.GetScenePresence(key);

                if (av != null)
                {
                    foreach (object o in args.Data)
                    {
                        switch (int.Parse(o.ToString()))
                        {
                            case ScriptBaseClass.OBJECT_NAME:
                                ret.Add(new LSL_String(av.Firstname + " " + av.Lastname));
                                break;
                            case ScriptBaseClass.OBJECT_DESC:
                                ret.Add(new LSL_String(""));
                                break;
                            case ScriptBaseClass.OBJECT_POS:
                                ret.Add(new LSL_Vector((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
                                break;
                            case ScriptBaseClass.OBJECT_ROT:
                                ret.Add(new LSL_Rotation(av.GetWorldRotation()));
                                break;
                            case ScriptBaseClass.OBJECT_VELOCITY:
                                ret.Add(new LSL_Vector(av.GetWorldVelocity()));
                                break;
                            case ScriptBaseClass.OBJECT_OWNER:
                                ret.Add(new LSL_String(id));
                                break;
                            case ScriptBaseClass.OBJECT_GROUP:
                                ret.Add(new LSL_String(UUID.Zero.ToString()));
                                break;
                            case ScriptBaseClass.OBJECT_CREATOR:
                                ret.Add(new LSL_String(UUID.Zero.ToString()));
                                break;
                            // For the following 8 see the Object version below
                            case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
                                ret.Add(new LSL_Integer(av.RunningScriptCount()));
                                break;
                            case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
                                ret.Add(new LSL_Integer(av.ScriptCount()));
                                break;
                            case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
                                ret.Add(new LSL_Integer(av.RunningScriptCount() * 16384));
                                break;
                            case ScriptBaseClass.OBJECT_SCRIPT_TIME:
                                ret.Add(new LSL_Float(av.ScriptExecutionTime() / 1000.0f));
                                break;
                            case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
                                ret.Add(new LSL_Integer(1));
                                break;
                            case ScriptBaseClass.OBJECT_SERVER_COST:
                                ret.Add(new LSL_Float(0));
                                break;
                            case ScriptBaseClass.OBJECT_STREAMING_COST:
                                ret.Add(new LSL_Float(0));
                                break;
                            case ScriptBaseClass.OBJECT_PHYSICS_COST:
                                ret.Add(new LSL_Float(0));
                                break;
                            case ScriptBaseClass.OBJECT_CHARACTER_TIME: // Pathfinding
                                ret.Add(new LSL_Float(0));
                                break;
                            case ScriptBaseClass.OBJECT_ROOT:
                                SceneObjectPart p = av.ParentPart;
                                if (p != null)
                                {
                                    ret.Add(new LSL_String(p.ParentGroup.RootPart.UUID.ToString()));
                                }
                                else
                                {
                                    ret.Add(new LSL_String(id));
                                }
                                break;
                            case ScriptBaseClass.OBJECT_ATTACHED_POINT:
                                ret.Add(new LSL_Integer(0));
                                break;
                            case ScriptBaseClass.OBJECT_PATHFINDING_TYPE: // Pathfinding
                                ret.Add(new LSL_Integer(ScriptBaseClass.OPT_AVATAR));
                                break;
                            case ScriptBaseClass.OBJECT_PHYSICS:
                                ret.Add(new LSL_Integer(0));
                                break;
                            case ScriptBaseClass.OBJECT_PHANTOM:
                                ret.Add(new LSL_Integer(0));
                                break;
                            case ScriptBaseClass.OBJECT_TEMP_ON_REZ:
                                ret.Add(new LSL_Integer(0));
                                break;
                            case ScriptBaseClass.OBJECT_RENDER_WEIGHT:
                                ret.Add(new LSL_Integer(-1));
                                break;
                            case ScriptBaseClass.OBJECT_HOVER_HEIGHT:
                                ret.Add(new LSL_Float(0));
                                break;
//.........这里部分代码省略.........
开发者ID:Gitlab11,项目名称:opensim,代码行数:101,代码来源:LSL_Api.cs


示例11: modInvokeL

        public LSL_List modInvokeL(string fname, params object[] parms)
        {
//            m_log.DebugFormat(
//                "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 
//                fname, 
//                string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 
//                ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);

            Type returntype = m_comms.LookupReturnType(fname);
            if (returntype != typeof(object[]))
                MODError(String.Format("return type mismatch for {0}",fname));

            object[] result = (object[])modInvoke(fname,parms);
            object[] llist = new object[result.Length];
            for (int i = 0; i < result.Length; i++)
            {
                if (result[i] is string)
                {
                    llist[i] = new LSL_String((string)result[i]);
                }
                else if (result[i] is int)
                {
                    llist[i] = new LSL_Integer((int)result[i]);
                }
                else if (result[i] is float)
                {
                    llist[i] = new LSL_Float((float)result[i]);
                }
                else if (result[i] is double)
                {
                    llist[i] = new LSL_Float((double)result[i]);
                }
                else if (result[i] is UUID)
                {
                    llist[i] = new LSL_Key(result[i].ToString());
                }
                else if (result[i] is OpenMetaverse.Vector3)
                {
                    OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i];
                    llist[i] = new LSL_Vector(vresult.X, vresult.Y, vresult.Z);
                }
                else if (result[i] is OpenMetaverse.Quaternion)
                {
                    OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i];
                    llist[i] = new LSL_Rotation(qresult.X, qresult.Y, qresult.Z, qresult.W);
                }
                else
                {
                    MODError(String.Format("unknown list element {1} returned by {0}", fname, result[i].GetType().Name));
                }
            }

            return new LSL_List(llist);
        }
开发者ID:Kubwa,项目名称:opensim,代码行数:54,代码来源:MOD_Api.cs


示例12: osSetWindParam

        public void osSetWindParam(string plugin, string param, LSL_Float value)
        {
            m_host.AddScriptLPS(1);

            if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID))
            {
                OSSLShoutError("osSetWindParam can only be used by estate managers or owner");
                return;
            }

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# LSL_Types.LSLInteger类代码示例发布时间:2022-05-24
下一篇:
C# Capabilities.Caps类代码示例发布时间: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