Exemple #1
0
        private void OnCreate()
        {
            //Animated = AnimatedByDefault;
            IsDeformable          = true;
            IsObstacle            = true;
            CanCollide            = true;
            AuspuffMaxParticles   = 70;
            AuspuffGenerationRate = 15; // particles/sec
            _posAuspuffPixel      = new Vector(0, 0);
            PosAuspuff            = new Vector(-0.1, 0.5);
            // Provide an existing config object at deserialization
            AuspuffPSConfig = new SmokeParticle.ParticleConfig();
            AuspuffPSConfig.AverageLifetime   = 3000; // ms
            AuspuffPSConfig.GroupVelocity     = new Vector(-100, -35);
            AuspuffPSConfig.GroupSpread       = 5;    // isotropic speed
            AuspuffPSConfig.AirDrag           = 0.6;
            AuspuffPSConfig.EmmissionArea     = new Rect(0, 0, 30, 30);
            AuspuffPSConfig.AppearanceSpread  = 0.05;
            AuspuffPSConfig.SubParticleSpread = 20;

            AuspuffPSConfig.ColorFrom  = Color.FromArgb(230, 30, 30, 30);
            AuspuffPSConfig.ColorTo    = Color.FromArgb(0, 108, 108, 108);
            AuspuffPSConfig.RadiusFrom = 4;
            AuspuffPSConfig.RadiusTo   = 50;
            AuspuffPSConfig.BlurFrom   = 7;
            AuspuffPSConfig.BlurTo     = 20;
            AddAnimation(new AnimationWobble(0.8, 0.005), "Wobble");
        }
Exemple #2
0
        private void OnCreate()
        {
            //Animated = AnimatedByDefault;
            IsDeformable = true;
            IsObstacle = true;
            CanCollide = true;
            AuspuffMaxParticles = 70;
            AuspuffGenerationRate = 15; // particles/sec
            _posAuspuffPixel = new Vector(0,0);
            PosAuspuff = new Vector(-0.1, 0.5);
            // Provide an existing config object at deserialization
            AuspuffPSConfig = new SmokeParticle.ParticleConfig();
            AuspuffPSConfig.AverageLifetime = 3000; // ms
            AuspuffPSConfig.GroupVelocity = new Vector(-100, -35);
            AuspuffPSConfig.GroupSpread = 5; // isotropic speed
            AuspuffPSConfig.AirDrag = 0.6;
            AuspuffPSConfig.EmmissionArea = new Rect(0, 0, 30, 30);
            AuspuffPSConfig.AppearanceSpread = 0.05;
            AuspuffPSConfig.SubParticleSpread = 20;

            AuspuffPSConfig.ColorFrom = Color.FromArgb(230, 30, 30, 30);
            AuspuffPSConfig.ColorTo = Color.FromArgb(0, 108, 108, 108);
            AuspuffPSConfig.RadiusFrom = 4;
            AuspuffPSConfig.RadiusTo = 50;
            AuspuffPSConfig.BlurFrom = 7;
            AuspuffPSConfig.BlurTo = 20;
            AddAnimation(new AnimationWobble(0.8, 0.005), "Wobble");
        }