Esempio n. 1
0
        public override void LoadContent()
        {
            base.LoadContent();

            HasCursor = false;

            World.Gravity = new Vector2(0, 9.82f);

            _border = new Border(World, ScreenManager, Camera);
            _walker = new TheoJansenWalker(World, ScreenManager, Camera, Vector2.Zero);
        }
        public override void LoadContent()
        {
            base.LoadContent();

            HasCursor = false;

            World.Gravity = new Vector2(0, 9.82f);

            _border = new Border(World, Lines, Framework.GraphicsDevice);

            CircleShape shape = new CircleShape(0.25f, 1);
            _grain = new Sprite(ContentWrapper.CircleTexture(0.25f, ContentWrapper.Gold, ContentWrapper.Grey));

            _circles = new Body[48];
            for (int i = 0; i < 48; i++)
            {
                _circles[i] = BodyFactory.CreateBody(World);
                _circles[i].BodyType = BodyType.Dynamic;
                _circles[i].Position = new Vector2(-24f + 1f * i, 10f);
                _circles[i].CreateFixture(shape);
            }

            _walker = new TheoJansenWalker(World, Vector2.Zero);
        }