Пример #1
0
 public void Update(GameTime gameTime, Animation player)
 {
     camCenter = new Vector2((player.charPosition.X + player.charRectangle.Width / 2) - 400, 0);         //if we add "-400" it will follow the player
     camTransform = Matrix.CreateScale(new Vector3(1, 1, 0)) *         //for zooming(1 means 100% the size)
         Matrix.CreateTranslation(new Vector3(-camCenter.X, -camCenter.Y, 0));
 }
Пример #2
0
        protected override void Initialize()
        {
            this.IsMouseVisible = true; //Sets the Mouse to be Visible!

            mainMenuBackground = new Background();
            optionsBackground = new Background();
            highScoreBackground = new Background();
            newGameBackground = new Background();
            pauseBackground = new Background();

            mainMenuBackground.SysPath = @"Background/bck1"; //bck1 ???
            optionsBackground.SysPath = @"Background/opt1"; //opt1 ??
            highScoreBackground.SysPath = @"Background/hi1"; //hi1 ??
            newGameBackground.SysPath = @"Background/bck1"; //bck1 ???
            pauseBackground.SysPath = @"Background/Pause";

            /* Intro */
            introPlayer = new VideoPlayer();

            /* Animation */
            charAnimation = new Animation(Content.Load<Texture2D>("Sprites/Animation"),
                new Vector2(378, 370), 47, 44); //Animation Sprite Initialization

            /* Map */
            map = new Map();

            base.Initialize();
        }