Controls the texture animation of a particular prim
Exemple #1
0
        private void SetTextureAnim (ISceneChildEntity part, int mode, int face, int sizex, int sizey, double start, double length, double rate)
        {

            Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
            pTexAnim.Flags = (Primitive.TextureAnimMode)mode;

            //ALL_SIDES
            if (face == ScriptBaseClass.ALL_SIDES)
                face = 255;

            pTexAnim.Face = (uint)face;
            pTexAnim.Length = (float)length;
            pTexAnim.Rate = (float)rate;
            pTexAnim.SizeX = (uint)sizex;
            pTexAnim.SizeY = (uint)sizey;
            pTexAnim.Start = (float)start;

            part.AddTextureAnimation(pTexAnim);
            part.ScheduleUpdate(PrimUpdateFlags.FindBest);
        }
Exemple #2
0
        private void SetTextureAnim(SceneObjectPart part, int mode, int face, int sizex, int sizey, double start, double length, double rate)
        {

            Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
            pTexAnim.Flags = (Primitive.TextureAnimMode)mode;

            //ALL_SIDES
            if (face == ScriptBaseClass.ALL_SIDES)
                face = 255;

            pTexAnim.Face = (uint)face;
            pTexAnim.Length = (float)length;
            pTexAnim.Rate = (float)rate;
            pTexAnim.SizeX = (uint)sizex;
            pTexAnim.SizeY = (uint)sizey;
            pTexAnim.Start = (float)start;

            part.AddTextureAnimation(pTexAnim);
            part.SendFullUpdateToAllClients();
            part.ParentGroup.HasGroupChanged = true;
        }
Exemple #3
0
        public void llSetTextureAnim(IScriptInstance script, int mode, int face, int sizex, int sizey, float start, float length, float rate)
        {
            LLPrimitive prim = script.Host as LLPrimitive;
            if (prim == null)
                return;

            Primitive.TextureAnimMode animMode = (Primitive.TextureAnimMode)mode;

            if (face == LSLConstants.ALL_SIDES)
                face = 255;

            Primitive.TextureAnimation animation = new Primitive.TextureAnimation();
            animation.Flags = animMode;
            animation.Face = (uint)face;
            animation.Length = length;
            animation.Rate = rate;
            animation.SizeX = (uint)sizex;
            animation.SizeY = (uint)sizey;
            animation.Start = start;

            prim.Prim.TextureAnim = animation;
            prim.Scene.EntityAddOrUpdate(this, prim, 0, (uint)LLUpdateFlags.TextureAnim);
        }