예제 #1
0
 public RainSystem(Game game, Vector3 Position, Vector2 scale, int nParticle,
     Vector2 ParticleSize, float lifeSpan, Vector3 wind, float FadeInTime, bool snow)
     : base(game)
 {
     this.graphicsDevice = game.GraphicsDevice;
     this.Position = Position;
     this.scale = scale;
     this.nParticle = nParticle;
     this.ParticleSize = ParticleSize;
     this.lifeSpan = lifeSpan;
     this.wind = wind;
     this.FadeInTime = FadeInTime;
     this.snow = snow;
     if(!snow)
         rp = new ParticleSystem(graphicsDevice, game.Content, game.Content.Load<Texture2D>("textures/Particles/rain"), nParticle, ParticleSize, lifeSpan, wind, FadeInTime);
     else rp = new ParticleSystem(graphicsDevice, game.Content, game.Content.Load<Texture2D>("textures/Particles/snow"), nParticle, ParticleSize, lifeSpan, wind, FadeInTime);
 }
예제 #2
0
        public FireSystem(Game game, Vector3 Position, Vector2 scale, int nParticle,
            Vector2 ParticleSize, Vector2 ParticleScaleSpeed, float lifeSpan, Vector3 wind, float FadeInTime)
            : base(game)
        {
            this.graphicsDevice = game.GraphicsDevice;
            this.Position = Position;
            this.scale = scale;
            this.nParticle = nParticle;
            this.ParticleSize = ParticleSize;
            this.ParticleScaleSpeed = ParticleScaleSpeed;
            this.lifeSpan = lifeSpan;
            this.wind = wind;
            this.FadeInTime = FadeInTime;
            SmokeSize = ParticleSize;

            ps = new ParticleSystem(graphicsDevice, game.Content, game.Content.Load<Texture2D>("textures/Particles/fire"), nParticle, ParticleSize, lifeSpan, wind, FadeInTime);
            smoke = new ParticleSystem(graphicsDevice, game.Content, game.Content.Load<Texture2D>("textures/Particles/smoke"), nParticle, ParticleSize, lifeSpan * 5, wind * 2, FadeInTime /100);
        }
예제 #3
0
        public GroundHitSystem(Game game, Vector3 Position, Vector2 scale, int nParticle,
            Vector2 ParticleSize, Vector2 ParticleScaleSpeed, float lifeSpan, Vector3 wind, float FadeInTime)
            : base(game)
        {
            this.graphicsDevice = game.GraphicsDevice;
            this.Position = Position;
            this.scale = scale;
            this.nParticle = nParticle;
            this.ParticleSize = ParticleSize;
            this.ParticleScaleSpeed = ParticleScaleSpeed;
            this.lifeSpan = lifeSpan;
            this.wind = wind;
            this.FadeInTime = FadeInTime;

            dust = new ParticleSystem(graphicsDevice, game.Content, game.Content.Load<Texture2D>("textures/Particles/smoke"),
                                        nParticle, ParticleSize, lifeSpan * 2, wind, FadeInTime);
            rocks = new ParticleSystem(graphicsDevice, game.Content, game.Content.Load<Texture2D>("textures/Particles/soil-rock"),
                                        nParticle * factor, ParticleSize / 8, lifeSpan, wind, FadeInTime);
        }