Example #1
0
        public BalloonDeathEmitter(Balloon balloon)
            : base(balloon.GetCenter().X + 25, balloon.GetCenter().Y + 25, balloon.z - 0.1f)
        {
            this.particleScale = 2f;
            this.particlesPerTick = 25;
            this.lifespanMS = 900;
            this.ticksPerSecond = 1;

            this.particleSpeedX = -2f;
            this.particleSpeedY = -1.33f;

            this.particleRandomSpeedX = 4f;
            this.particleRandomSpeedY = 6f;

            this.particleLifespanMS = 500;

            this.fadeAccordingToLifespan = true;

            this.particleGravity = 0.75f;
            this.particleScale = 0.15f;

            switch (balloon.color)
            {
                case Balloon.BalloonColor.Black:
                    this.particleTexture = BALLOON_DEATH_PARTICLE_BLACK;
                    break;
                case Balloon.BalloonColor.Blue:
                    this.particleTexture = BALLOON_DEATH_PARTICLE_BLUE;
                    break;
                case Balloon.BalloonColor.Yellow:
                    this.particleTexture = BALLOON_DEATH_PARTICLE_YELLOW;
                    break;
                case Balloon.BalloonColor.Pink:
                    this.particleTexture = BALLOON_DEATH_PARTICLE_PINK;
                    break;
            }

            this.balloon = balloon;

            this.blendState = BlendState.AlphaBlend;
        }