Ejemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            t2alucard   = Content.Load <Texture2D>(@"Textures\alucard_colors");
            //crouching = new AnimatedSprite(Content.Load<Texture2D>(@"Textures\alucard_colors"), 19,56,51,46,14);
            //crouching.X = 0;
            //crouching.Y = 0;

            //running = new AnimatedSprite(Content.Load<Texture2D>(@"Textures\alucard_colors"), 32,271,39,46,16);
            //running.X = 0;
            //running.Y = 0;

            alucardRunning = new MobileSprite(t2alucard);
            alucardRunning.Sprite.AddAnimation("leftstop", 243, 160, 32, 64, 1, 0.1f);
            alucardRunning.Sprite.AddAnimation("left", 243, 160, 32, 64, 4, 0.1f);
            alucardRunning.Sprite.AddAnimation("rightstop", 243, 160, 35, 48, 7, 0.1f);
            alucardRunning.Sprite.AddAnimation("right", 243, 160, 34, 49, 16, 0.1f);
            alucardRunning.Sprite.CurrentAnimation = "rightstop";
            alucardRunning.Position = new Vector2(551, 346);
            //alucardRunning.Position = new Vector2(100, 300);
            alucardRunning.Sprite.AutoRotate = false;
            alucardRunning.IsPathing         = false;
            alucardRunning.IsMoving          = false;

            // TODO: use this.Content to load your game content here
            //background = new Background(Content, @"Textures\background");
            background = new Background(Content, @"Textures\fullbackground-1");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            t2alucard = Content.Load<Texture2D>(@"Textures\alucard_colors");
            //crouching = new AnimatedSprite(Content.Load<Texture2D>(@"Textures\alucard_colors"), 19,56,51,46,14);
            //crouching.X = 0;
            //crouching.Y = 0;

            //running = new AnimatedSprite(Content.Load<Texture2D>(@"Textures\alucard_colors"), 32,271,39,46,16);
            //running.X = 0;
            //running.Y = 0;

            alucardRunning = new MobileSprite(t2alucard);
            alucardRunning.Sprite.AddAnimation("leftstop", 243, 160, 32, 64, 1, 0.1f);
            alucardRunning.Sprite.AddAnimation("left", 243, 160, 32, 64, 4, 0.1f);
            alucardRunning.Sprite.AddAnimation("rightstop", 243, 160, 35, 48, 7, 0.1f);
            alucardRunning.Sprite.AddAnimation("right", 243, 160, 34, 49, 16, 0.1f);
            alucardRunning.Sprite.CurrentAnimation = "rightstop";
            alucardRunning.Position = new Vector2(551, 346);
            //alucardRunning.Position = new Vector2(100, 300);
            alucardRunning.Sprite.AutoRotate = false;
            alucardRunning.IsPathing = false;
            alucardRunning.IsMoving = false;

            // TODO: use this.Content to load your game content here
            //background = new Background(Content, @"Textures\background");
            background = new Background(Content, @"Textures\fullbackground-1");
        }