Beispiel #1
0
        public void LoadAssets()
        {
            // Load texture
            LoadTextures();

            // Create new simulation world
            _world = new World(new Vector2(0, 6f));
            _world.ContactManager.BeginContact = BeginContact;

            // Define the ground
            Constants.Initialize(ScreenManager);
            float simulatedHeight = Constants.FloorPosition.Y / Constants.Scale;
            float simulatedWidth  = Constants.WorldWidth;

            startPos = new Vector2(1.5f, simulatedHeight - 1.5f);

            //floor
            BodyFactory.CreateEdge(_world, new Vector2(0.0f, simulatedHeight), new Vector2(simulatedWidth * 2, simulatedHeight));

            ragdoll = new Ragdoll(_world, ScreenManager, startPos);

            Camera.Current.CenterPointTarget = 620f;
            //Camera.Current.StartTracking (_projectile.Body);
            Camera.Current.ScreenScale = ScreenManager.ScreenScale;
        }
Beispiel #2
0
        public override void LoadContent()
        {
            base.LoadContent();

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

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

            _ragdoll = new Ragdoll(World, ScreenManager, Vector2.Zero);
            LoadObstacles();

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

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

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

            _ragdoll = new Ragdoll(World, ScreenManager, Vector2.Zero);
            LoadObstacles();

            SetUserAgent(_ragdoll.Body, 1000f, 400f);
        }
Beispiel #4
0
        public void LoadAssets()
        {
            // Load texture
            LoadTextures();

            // Create new simulation world
            _world = new World (new Vector2 (0, 6f));
            _world.ContactManager.BeginContact = BeginContact;

            // Define the ground
            Constants.Initialize (ScreenManager);
            float simulatedHeight = Constants.FloorPosition.Y / Constants.Scale;
            float simulatedWidth = Constants.WorldWidth;
            startPos = new Vector2 (1.5f, simulatedHeight - 1.5f);

            //floor
            BodyFactory.CreateEdge (_world, new Vector2 (0.0f, simulatedHeight), new Vector2 (simulatedWidth* 2, simulatedHeight));

            ragdoll = new Ragdoll(_world,ScreenManager,startPos);

            Camera.Current.CenterPointTarget = 620f;
            //Camera.Current.StartTracking (_projectile.Body);
            Camera.Current.ScreenScale = ScreenManager.ScreenScale;
        }