public EffectDie(Color colour, KillableSprite kS)
 {
     xDirRange = new Vector (new PointF (-1.0f, 2.0f));
     yDirRange = new Vector (new PointF (-1.0f, -1.0f));
     xSpeedRange = new Vector (new Point (150, 200));
     ySpeedRange = new Vector (new Point (150, 200));
     numberRange = new Vector (new Point (100, 200));
     xStopRange = new Vector (new Point ((int)(kS.width*1.1), kS.width*2));
     yStopRange = new Vector (new Point ((int)(kS.height*1.1), kS.height*2));//(Tile.HEIGHT - 5, Tile.HEIGHT-2));
     newParticlesNumberRange = new Vector (new Point (0, 0));
     newParticlesTimeRange = new Vector (new PointF (0, 0));
     alpha = 255;
     alphaStep = -200;
     repeat = false;
     graphics = new Graphic[]{new Graphic(colour, WIDTH, HEIGHT), new Graphic(Color.Red, WIDTH, HEIGHT)};
     Vector blank = new Vector (0);
     template = new ParticleOptions (blank, blank, xDirRange, yDirRange, xSpeedRange, ySpeedRange, numberRange,
         xStopRange,yStopRange, newParticlesTimeRange, newParticlesNumberRange, alpha, alphaStep, repeat, graphics);
 }
Пример #2
0
        public EffectDie(Color colour, KillableSprite kS)
        {
            xDirRange               = new Vector(new PointF(-1.0f, 2.0f));
            yDirRange               = new Vector(new PointF(-1.0f, -1.0f));
            xSpeedRange             = new Vector(new Point(150, 200));
            ySpeedRange             = new Vector(new Point(150, 200));
            numberRange             = new Vector(new Point(100, 200));
            xStopRange              = new Vector(new Point((int)(kS.width * 1.1), kS.width * 2));
            yStopRange              = new Vector(new Point((int)(kS.height * 1.1), kS.height * 2));//(Tile.HEIGHT - 5, Tile.HEIGHT-2));
            newParticlesNumberRange = new Vector(new Point(0, 0));
            newParticlesTimeRange   = new Vector(new PointF(0, 0));
            alpha     = 255;
            alphaStep = -200;
            repeat    = false;
            graphics  = new Graphic[] { new Graphic(colour, WIDTH, HEIGHT), new Graphic(Color.Red, WIDTH, HEIGHT) };
            Vector blank = new Vector(0);

            template = new ParticleOptions(blank, blank, xDirRange, yDirRange, xSpeedRange, ySpeedRange, numberRange,
                                           xStopRange, yStopRange, newParticlesTimeRange, newParticlesNumberRange, alpha, alphaStep, repeat, graphics);
        }