当前位置: 首页>>代码示例>>C#>>正文


C# ScenePresence.SendTerseUpdateToAllClients方法代码示例

本文整理汇总了C#中OpenSim.Region.Framework.Scenes.ScenePresence.SendTerseUpdateToAllClients方法的典型用法代码示例。如果您正苦于以下问题:C# ScenePresence.SendTerseUpdateToAllClients方法的具体用法?C# ScenePresence.SendTerseUpdateToAllClients怎么用?C# ScenePresence.SendTerseUpdateToAllClients使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenSim.Region.Framework.Scenes.ScenePresence的用法示例。


在下文中一共展示了ScenePresence.SendTerseUpdateToAllClients方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetPrimParams


//.........这里部分代码省略.........
                        case (int)ScriptBaseClass.PRIM_PHYSICS:
                        case (int)ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE:
                        case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
                        case (int)ScriptBaseClass.PRIM_NAME:
                        case (int)ScriptBaseClass.PRIM_DESC:
                            if (remain < 1)
                                return new LSL_List();
                            idx++;
                            break;

                        case (int)ScriptBaseClass.PRIM_GLOW:
                        case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
                        case (int)ScriptBaseClass.PRIM_TEXGEN:
                            if (remain < 2)
                                return new LSL_List();
                            idx += 2;
                            break;

                        case (int)ScriptBaseClass.PRIM_TYPE:
                            if (remain < 3)
                                return new LSL_List();
                            code = (int)rules.GetLSLIntegerItem(idx++);
                            remain = rules.Length - idx;
                            switch (code)
                            {
                                case (int)ScriptBaseClass.PRIM_TYPE_BOX:
                                case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER:
                                case (int)ScriptBaseClass.PRIM_TYPE_PRISM:
                                    if (remain < 6)
                                        return new LSL_List();
                                    idx += 6;
                                    break;

                                case (int)ScriptBaseClass.PRIM_TYPE_SPHERE:
                                    if (remain < 5)
                                        return new LSL_List();
                                    idx += 5;
                                    break;

                                case (int)ScriptBaseClass.PRIM_TYPE_TORUS:
                                case (int)ScriptBaseClass.PRIM_TYPE_TUBE:
                                case (int)ScriptBaseClass.PRIM_TYPE_RING:
                                    if (remain < 11)
                                        return new LSL_List();
                                    idx += 11;
                                    break;

                                case (int)ScriptBaseClass.PRIM_TYPE_SCULPT:
                                    if (remain < 2)
                                        return new LSL_List();
                                    idx += 2;
                                    break;
                            }
                            break;

                        case (int)ScriptBaseClass.PRIM_COLOR:
                        case (int)ScriptBaseClass.PRIM_TEXT:
                        case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
                        case (int)ScriptBaseClass.PRIM_OMEGA:
                            if (remain < 3)
                                return new LSL_List();
                            idx += 3;
                            break;

                        case (int)ScriptBaseClass.PRIM_TEXTURE:
                        case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
                        case (int)ScriptBaseClass.PRIM_PHYSICS_MATERIAL:
                            if (remain < 5)
                                return new LSL_List();
                            idx += 5;
                            break;

                        case (int)ScriptBaseClass.PRIM_FLEXIBLE:
                            if (remain < 7)
                                return new LSL_List();

                            idx += 7;
                            break;

                        case (int)ScriptBaseClass.PRIM_LINK_TARGET:
                            if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless.
                                return new LSL_List();

                            return rules.GetSublist(idx, -1);
                    }
                }
            }
            catch (InvalidCastException e)
            {
                Error(originFunc,string.Format(
                        " error running rule #{1}: arg #{2} ",
                         rulesParsed, idx - idxStart) + e.Message);
            }
            finally
            {
                if (positionChanged)
                    av.SendTerseUpdateToAllClients();
            }
            return new LSL_List();
        }
开发者ID:TomDataworks,项目名称:opensim,代码行数:101,代码来源:LSL_Api.cs


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