Beispiel #1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            spriteSheet = Content.Load <Texture2D>(@"Textures\SpriteSheet");

            Player.Initialize(spriteSheet, new Rectangle(0, 64, 32, 32), 6,
                              new Rectangle(0, 96, 32, 32), 1, new Vector2(256, 256));

            WeaponManager.Texture = spriteSheet;

            EffectsManager.Initialize(spriteSheet,
                                      new Rectangle(0, 288, 2, 2),
                                      new Rectangle(0, 256, 32, 32), 3);

            TileMap.Initialize(spriteSheet);

            GoalManager.Initialize(spriteSheet,
                                   new Rectangle(0, 7 * 32, 32, 32),
                                   new Rectangle(3 * 32, 7 * 32, 32, 32), 3, 1);

            EnemyManager.Initialize(spriteSheet,
                                    new Rectangle(0, 160, 32, 32));

            titleScreen = Content.Load <Texture2D>(@"Textures\TitleScreen");

            pericles14 = Content.Load <SpriteFont>(@"Fonts\Pericles14");

            Camera.WorldRectangle = new Rectangle(0, 0, 1600, 1600);
            Camera.ViewportWidth  = 800;
            Camera.ViewportHeight = 600;
        }