/// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here
     person   = new PixelCollision(this, new Vector2(100, 100), "Person");
     triangle = new PixelCollision(this, new Vector2(300, 90), "Block");
     base.Initialize();
 }
Esempio n. 2
0
        protected override void Initialize()
        {
            graphics.PreferredBackBufferHeight = 600;
            graphics.PreferredBackBufferWidth  = 800;
            graphics.IsFullScreen = false;
            graphics.ApplyChanges();
            Flycon    = new PixelCollision(this, new Vector2(400, 100), new string[] { "flycon" });
            person    = new PixelCollision(this, personInitialPosition, new string[] { "person3", "Person2" });
            triangle  = new PixelCollision(this, new Vector2(300, 90), new string[] { "flycon" });
            obstacles = new PixelCollision[1000];
            Vector2 jumpe = new Vector2(260, 478);

            for (int i = 0; i < obstacles.Length; i++)
            {
                obstacles[i] = new PixelCollision(this, new Vector2(i * 300, 368), new string[] { "Person1" });
            }

            base.Initialize();
        }