當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。