Beispiel #1
0
        public override void LoadContent()
        {
            base.LoadContent();

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

            _border = new Border(World, this, ScreenManager.GraphicsDevice.Viewport);

            _agent = new Agent(World, this, new Vector2(5f, -10f));

            _pyramid = new Pyramid(World, this, new Vector2(0f, 15f), PyramidBaseBodyCount, 1f);

            SetUserAgent(_agent.Body, 1000f, 400f);
        }
        public override void LoadContent()
        {
            base.LoadContent();

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

            _border = new Border(World, this, ScreenManager.GraphicsDevice.Viewport);

            _agent = new Agent(World, this, new Vector2(-6.9f, -11f));

            LoadObstacles();

            SetUserAgent(_agent.Body, 1000f, 400f);
        }
        public override void LoadContent()
        {
            base.LoadContent();

            World.Gravity = Vector2.Zero;

            _border = new Border(World, this, ScreenManager.GraphicsDevice.Viewport);

            //Cat1=Circles, Cat2=Rectangles, Cat3=Gears, Cat4=Stars
            _agent = new Agent(World, this, Vector2.Zero);

            //Collide with all but stars
            _agent.CollisionCategories = Category.All & ~Category.Cat4;
            _agent.CollidesWith = Category.All & ~Category.Cat4;

            Vector2 startPosition = new Vector2(-20f, -11f);
            Vector2 endPosition = new Vector2(20, -11f);
            _circles = new Objects(World, this, startPosition, endPosition, 15, 0.6f, ObjectType.Circle);

            //Collide with itself only
            _circles.CollisionCategories = Category.Cat1;
            _circles.CollidesWith = Category.Cat1;

            startPosition = new Vector2(-20, 11f);
            endPosition = new Vector2(20, 11f);
            _rectangles = new Objects(World, this, startPosition, endPosition, 15, 1.2f, ObjectType.Rectangle);

            //Collides with itself only
            _rectangles.CollisionCategories = Category.Cat2;
            _rectangles.CollidesWith = Category.Cat2;

            startPosition = new Vector2(-20, 7);
            endPosition = new Vector2(-20, -7);
            _gears = new Objects(World, this, startPosition, endPosition, 5, 0.6f, ObjectType.Gear);

            //Collides with stars
            _gears.CollisionCategories = Category.Cat3;
            _gears.CollidesWith = Category.Cat3 | Category.Cat4;

            startPosition = new Vector2(20, 7);
            endPosition = new Vector2(20, -7);
            _stars = new Objects(World, this, startPosition, endPosition, 5, 0.6f, ObjectType.Star);

            //Collides with gears
            _stars.CollisionCategories = Category.Cat4;
            _stars.CollidesWith = Category.Cat3 | Category.Cat4;

            SetUserAgent(_agent.Body, 1000f, 400f);
        }
Beispiel #4
0
        public override void LoadContent()
        {
            base.LoadContent();

            World.Gravity = new Vector2(0.2f, 30f);

            _border = new Border(World, this, ScreenManager.GraphicsDevice.Viewport);

            _agentOne = new Agent(World, this, new Vector2(15f, 2f));
            _agentOne.Body.BodyType = BodyType.Static;
            _agentTwo = new Agent(World, this, new Vector2(0f, 2f));
            _agentTwo.Body.BodyType = BodyType.Static;
            _agentThree = new Agent(World, this, new Vector2(-15f, 2f));
            _agentThree.Body.BodyType = BodyType.Static;

            _bollhav = new BollHav(World, this, new Vector2(0f, 15f), NumBalls, 0.2f);
        }
Beispiel #5
0
        public override void LoadContent()
        {
            base.LoadContent();

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

            _border = new Border(World, this, ScreenManager.GraphicsDevice.Viewport);

            _agent = new Agent(World, this, new Vector2(0f, 10f));
            _spiders = new Spider[8];

            for (int i = 0; i < _spiders.Length; i++)
            {
                _spiders[i] = new Spider(World, this, new Vector2(0f, 8f - (i + 1) * 2f));
            }

            SetUserAgent(_agent.Body, 1000f, 400f);
        }