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


C# ISceneChildEntity.GetTextColor方法代码示例

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


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

示例1: GetLinkPrimitiveParams


//.........这里部分代码省略.........
                if (code == (int)ScriptBaseClass.PRIM_FLEXIBLE)
                {
                    PrimitiveBaseShape shape = part.Shape;

                    if (shape.FlexiEntry)
                        res.Add(new LSL_Integer(1));              // active
                    else
                        res.Add(new LSL_Integer(0));
                    res.Add(new LSL_Integer(shape.FlexiSoftness));// softness
                    res.Add(new LSL_Float(shape.FlexiGravity));   // gravity
                    res.Add(new LSL_Float(shape.FlexiDrag));      // friction
                    res.Add(new LSL_Float(shape.FlexiWind));      // wind
                    res.Add(new LSL_Float(shape.FlexiTension));   // tension
                    res.Add(new LSL_Vector(shape.FlexiForceX,       // force
                                           shape.FlexiForceY,
                                           shape.FlexiForceZ));
                }

                if (code == (int)ScriptBaseClass.PRIM_TEXGEN)
                {
                    if (remain < 1)
                        return res;

                    face = (int)rules.GetLSLIntegerItem(idx++);
                    if (face == ScriptBaseClass.ALL_SIDES)
                    {
                        for (face = 0; face < GetNumberOfSides(part); face++)
                        {
                            MappingType texgen = tex.GetFace((uint)face).TexMapType;
                            // Convert MappingType to PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR etc.
                            res.Add(new LSL_Integer((uint)texgen >> 1));
                        }
                    }
                    else
                    {
                        if (face >= 0 && face < GetNumberOfSides(part))
                        {
                            MappingType texgen = tex.GetFace((uint)face).TexMapType;
                            res.Add(new LSL_Integer((uint)texgen >> 1));
                        }
                    }
                }

                if (code == (int)ScriptBaseClass.PRIM_POINT_LIGHT)
                {
                    PrimitiveBaseShape shape = part.Shape;

                    if (shape.LightEntry)
                        res.Add(new LSL_Integer(1));              // active
                    else
                        res.Add(new LSL_Integer(0));
                    res.Add(new LSL_Vector(shape.LightColorR,       // color
                                           shape.LightColorG,
                                           shape.LightColorB));
                    res.Add(new LSL_Float(shape.LightIntensity)); // intensity
                    res.Add(new LSL_Float(shape.LightRadius));    // radius
                    res.Add(new LSL_Float(shape.LightFalloff));   // falloff
                }

                if (code == (int)ScriptBaseClass.PRIM_GLOW)
                {
                    if (remain < 1)
                        return res;

                    face = (int)rules.GetLSLIntegerItem(idx++);
                    if (face == ScriptBaseClass.ALL_SIDES)
                    {
                        for (face = 0; face < GetNumberOfSides(part); face++)
                        {
                            Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
                            res.Add(new LSL_Float(texface.Glow));
                        }
                    }
                    else
                    {
                        if (face >= 0 && face < GetNumberOfSides(part))
                        {
                            Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
                            res.Add(new LSL_Float(texface.Glow));
                        }
                    }
                }

                if (code == (int)ScriptBaseClass.PRIM_TEXT)
                {
                    Color4 textColor = part.GetTextColor();
                    res.Add(part.Text);
                    res.Add(new LSL_Vector(textColor.R,
                                           textColor.G,
                                           textColor.B));
                    res.Add(new LSL_Float(textColor.A));
                }
                if (code == (int)ScriptBaseClass.PRIM_ROT_LOCAL)
                {
                    Quaternion rtmp = part.RotationOffset;
                    res.Add(new LSL_Rotation(rtmp.X, rtmp.Y, rtmp.Z, rtmp.W));
                }
            }
            return res;
        }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:101,代码来源:LSL_Api.cs

示例2: GetLinkPrimitiveParams


//.........这里部分代码省略.........
                {
                    if (remain < 1)
                        return res;

                    face = rules.GetLSLIntegerItem(idx++);
                    if (face == ScriptBaseClass.ALL_SIDES)
                    {
                        for (face = 0; face < GetNumberOfSides(part); face++)
                        {
                            MappingType texgen = tex.GetFace((uint) face).TexMapType;
                            // Convert MappingType to PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR etc.
                            res.Add(new LSL_Integer((uint) texgen >> 1));
                        }
                    }
                    else
                    {
                        if (face >= 0 && face < GetNumberOfSides(part))
                        {
                            MappingType texgen = tex.GetFace((uint) face).TexMapType;
                            res.Add(new LSL_Integer((uint) texgen >> 1));
                        }
                    }
                }

                else if (code == (int) ScriptBaseClass.PRIM_POINT_LIGHT)
                {
                    PrimitiveBaseShape shape = part.Shape;

                    res.Add(shape.LightEntry ? new LSL_Integer(1) : new LSL_Integer(0));
                    res.Add(new LSL_Vector(shape.LightColorR, // color
                                           shape.LightColorG,
                                           shape.LightColorB));
                    res.Add(new LSL_Float(shape.LightIntensity)); // intensity
                    res.Add(new LSL_Float(shape.LightRadius)); // radius
                    res.Add(new LSL_Float(shape.LightFalloff)); // falloff
                }

                else if (code == (int) ScriptBaseClass.PRIM_GLOW)
                {
                    if (remain < 1)
                        return res;

                    face = rules.GetLSLIntegerItem(idx++);
                    if (face == ScriptBaseClass.ALL_SIDES)
                    {
                        for (face = 0; face < GetNumberOfSides(part); face++)
                        {
                            Primitive.TextureEntryFace texface = tex.GetFace((uint) face);
                            res.Add(new LSL_Float(texface.Glow));
                        }
                    }
                    else
                    {
                        if (face >= 0 && face < GetNumberOfSides(part))
                        {
                            Primitive.TextureEntryFace texface = tex.GetFace((uint) face);
                            res.Add(new LSL_Float(texface.Glow));
                        }
                    }
                }

                else if (code == (int) ScriptBaseClass.PRIM_TEXT)
                {
                    Color4 textColor = part.GetTextColor();
                    res.Add(new LSL_String(part.Text));
                    res.Add(new LSL_Vector(textColor.R,
                                           textColor.G,
                                           textColor.B));
                    res.Add(new LSL_Float(textColor.A));
                }
                else if (code == (int) ScriptBaseClass.PRIM_ROT_LOCAL)
                {
                    Quaternion rtmp = part.GetRotationOffset();
                    res.Add(new LSL_Rotation(rtmp.X, rtmp.Y, rtmp.Z, rtmp.W));
                }
                else if (code == (int) ScriptBaseClass.PRIM_OMEGA)
                {
                    Vector3 axis = part.OmegaAxis;
                    LSL_Float spinRate = part.OmegaSpinRate;
                    LSL_Float gain = part.OmegaGain;
                    res.Add(axis);
                    res.Add(spinRate);
                    res.Add(gain);
                }
                else if (code == (int) ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE)
                {
                    res.Add(new LSL_Integer(part.PhysicsType));
                }
                else if (code == (int) ScriptBaseClass.PRIM_LINK_TARGET)
                {
                    if (remain < 1)
                        continue;
                    LSL_Integer nextLink = rules.GetLSLIntegerItem(idx++);
                    List<ISceneChildEntity> entities = GetLinkParts(nextLink);
                    if (entities.Count > 0)
                        part = entities[0];
                }
            }
            return res;
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:101,代码来源:LSL_Api.cs


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