Exemple #1
0
        static ParticleType _createStarType()
        {
            var type = new ParticleType(new Sprite(Textures.Star), 75);

            type.AddDescriptors(new IParticleTypeDescriptor[]
            {
                new InitialStateDescriptor().UniformRotation().UniformScale(0.36, 0.60),
                new TransformationDescriptor().ConstantRotation(Angle.Deg(3)).ConstantScaling(0.98),
                LinearMotionDescriptor.Uniform(5, 6),
                FadeoutDescriptor.Default
            });

            return(type);
        }
Exemple #2
0
        static ParticleType _createPentagonType()
        {
            var type = new ParticleType(Polygon.Regular(5, 25), 75);

            type.BlendMode = BlendMode.Additive;
            type.AddDescriptors(new IParticleTypeDescriptor[]
            {
                ColorDescriptor.Uniform(),
                new InitialStateDescriptor().UniformRotation().UniformScale(1, 2),
                new TransformationDescriptor().UniformRotation(Angle.Deg(-3), Angle.Deg(3)).ConstantScaling(0.95),
                LinearMotionDescriptor.Uniform(5, 12),
                FadeoutDescriptor.Default,
                attractor
            });

            return(type);
        }