Esempio n. 1
0
        public void Init(RenderHelper render, Rectangle screenSize)
        {
            _device     = render.Device;
            _batch      = render.Batch;
            _screenSize = screenSize;
            _streaks    = new List <Streak>(250);
            var rand = new Random(10);

            for (int i = 0; i < 150; i++)
            {
                var start = new Point(rand.Next(-400, _screenSize.Width + 400), rand.Next(-screenSize.Height, screenSize.Height));
                _streaks.Add(new Streak(start, rand.Next(300, 400), rand.Next(2, 4)));
            }
            for (int i = 0; i < 50; i++)
            {
                var start = new Point(rand.Next(-400, _screenSize.Width + 400), rand.Next(-screenSize.Height, screenSize.Height));
                _streaks.Add(new Streak(start, rand.Next(100, 200), rand.Next(6, 10)));
            }

            for (int i = 0; i < 50; i++)
            {
                var start = new Point(rand.Next(-400, _screenSize.Width + 400), rand.Next(-screenSize.Height, screenSize.Height));
                _streaks.Add(new Streak(start, rand.Next(10, 50), rand.Next(15, 20)));
            }
        }
Esempio n. 2
0
        public void Init(GraphicsDevice device)
        {
            Device = device;

            Pixel = new Texture2D(Device, 1, 1, false, SurfaceFormat.Color);
            Pixel.SetData <Color>(new Color[] { Color.White });
            ActiveCamera = new Camera(new Vector2(1920, 1080));
            //Batch = new SpriteBatch(Device);

            Batch = new SpriteBatchDecarator(new SpriteBatch(Device), this);
        }
Esempio n. 3
0
 public void Init(RenderHelper helper, Rectangle screenSize)
 {
     _device     = helper.Device;
     _batch      = helper.Batch;
     _screenSize = screenSize;
 }