Exemplo n.º 1
0
    public Game()
    {
      ResetToDefault();
      ratioD = d2 / d1;

      pixel_painter = new PixelPainter();
      sprite_painter = new SpritePainter();
      painter = sprite_painter;

      rnd = new Random((int) DateTime.Now.ToBinary());
      random_numbers = new double[asteriks_count_max];
      for (var i = 0; i < asteriks_count_max; i++) random_numbers[i] = (rnd.NextGaussian(rnd.Next(-100, 100), 100 / 2));

      render = new Thread(Render){ IsBackground = true };
    }
Exemplo n.º 2
0
        public Game()
        {
            ResetToDefault();
            ratioD = d2 / d1;

            pixel_painter  = new PixelPainter();
            sprite_painter = new SpritePainter();
            painter        = sprite_painter;

            rnd            = new Random((int)DateTime.Now.ToBinary());
            random_numbers = new double[asteriks_count_max];
            for (var i = 0; i < asteriks_count_max; i++)
            {
                random_numbers[i] = (rnd.NextGaussian(rnd.Next(-100, 100), 100 / 2));
            }

            render = new Thread(Render)
            {
                IsBackground = true
            };
        }