Пример #1
0
        public override void Initialize()
        {
            ContentManager Content = ScreenManager.Game.Content;

            lives         = 3;
            LplatformList = new List <Platform>();
            DplatformList = new List <Platform>();

            player = new PlayerSprite(Art.PlayerTex,
                                      new Vector2(Art.PlayerTex.Width / 4, Art.PlayerTex.Height / 2),
                                      new Vector2(150, 720),
                                      new Vector2(0, 0),
                                      new Rectangle(0, 0, 64, 64),
                                      1.0f, 1, 3, 3);

            enemy = new EnemySprite(Art.Cat_EnTex,
                                    new Vector2(96, 32),
                                    new Vector2(600, 680),
                                    new Vector2(2, 0),
                                    new Rectangle(0, 0, 192, 64),
                                    1.0f, 1, 2, 2);

            portal = new Portal(Art.EPort,
                                new Vector2(26, 32),
                                new Vector2(1500, 680),
                                new Vector2(0, 0),
                                new Rectangle(0, 0, 52, 64),
                                1.0f, 1, 8, 8);

            LplatformList.Add(platform = new Platform(Art.LPlat,
                                                      new Vector2(Art.LPlat.Width / 2, Art.LPlat.Height / 2),
                                                      new Vector2(350, 675),
                                                      new Vector2(0, 0),
                                                      new Rectangle(0, 0, 64, 64)));

            DplatformList.Add(platform = new Platform(Art.DPlat,
                                                      new Vector2(Art.DPlat.Width / 2, Art.DPlat.Height / 2),
                                                      new Vector2(350, 675),
                                                      new Vector2(0, 0),
                                                      new Rectangle(0, 0, 64, 64)));

            LplatformList.Add(platform = new Platform(Art.LLPlat,
                                                      new Vector2(Art.LLPlat.Width / 2, Art.LLPlat.Height / 2),
                                                      new Vector2(975, 595),
                                                      new Vector2(0, 0),
                                                      new Rectangle(0, 0, 128, 256)));

            spriteBatch = ScreenManager.SpriteBatch;
            viewport    = ScreenManager.Game.GraphicsDevice.Viewport;
            base.Initialize();
        }
Пример #2
0
        public override void Initialize()
        {
            ContentManager Content = ScreenManager.Game.Content;
            lives = 3;
            LplatformList = new List<Platform>();
            DplatformList = new List<Platform>();

            player = new PlayerSprite(Art.PlayerTex,
                new Vector2(Art.PlayerTex.Width / 4, Art.PlayerTex.Height / 2),
                new Vector2(150, 720),
                new Vector2(0,0),
                new Rectangle(0,0,64,64),
                1.0f, 1, 3, 3);

            enemy = new EnemySprite(Art.Cat_EnTex,
                new Vector2(96, 32),
                new Vector2(600, 680),
                new Vector2(2, 0),
                new Rectangle(0, 0, 192, 64),
                1.0f, 1, 2, 2);

            portal = new Portal(Art.EPort,
                new Vector2(26, 32),
                new Vector2(1500, 680),
                new Vector2(0, 0),
                new Rectangle(0, 0, 52, 64),
                1.0f, 1, 8, 8);

            LplatformList.Add(platform = new Platform(Art.LPlat,
                new Vector2(Art.LPlat.Width / 2, Art.LPlat.Height / 2),
                new Vector2(350, 675),
                new Vector2(0, 0),
                new Rectangle(0, 0, 64, 64)));

            DplatformList.Add(platform = new Platform(Art.DPlat,
                new Vector2(Art.DPlat.Width / 2, Art.DPlat.Height / 2),
                new Vector2(350, 675),
                new Vector2(0, 0),
                new Rectangle(0, 0, 64, 64)));

            LplatformList.Add(platform = new Platform(Art.LLPlat,
                new Vector2(Art.LLPlat.Width / 2, Art.LLPlat.Height / 2),
                new Vector2(975, 595),
                new Vector2(0, 0),
                new Rectangle(0, 0, 128, 256)));

            spriteBatch = ScreenManager.SpriteBatch;
            viewport = ScreenManager.Game.GraphicsDevice.Viewport;
            base.Initialize();
        }