Ejemplo n.º 1
0
        public override void LoadContent(ContentManager content, InputManager inputManager, Vector2 position)
        {
            base.LoadContent(content, inputManager, position);
            moveAnimation = new LoopingAnimation();
            image         = content.Load <Texture2D> ("turtle");
            moveAnimation.LoadContent(content, image, new Vector2(8, 2), new Vector2(0, 0), 1);
            float scale = 0.5f;

            moveAnimation.Scale = scale;
            box = new Rectangle((int)position.X, (int)position.Y, (int)(moveAnimation.FrameWidth * scale), (int)(moveAnimation.FrameHeight * scale));
        }
Ejemplo n.º 2
0
        public override void LoadContent(ContentManager content, InputManager inputManager)
        {
            input    = inputManager;
            position = new Vector2(0, 100);
            throwing = false;

            backpack = new List <Weapon> ();
            base.LoadContent(content, inputManager);

            image         = content.Load <Texture2D> ("bear_man_sprite_sheet");
            walkAnimation = new LoopingAnimation();
            walkAnimation.LoadContent(content, image, new Vector2(8, 5), new Vector2(0, 0), 7);
            throwAnimation = new FiniteAnimation();
            throwAnimation.LoadContent(content, image, new Vector2(8, 5), new Vector2(0, 1), 4);
            throwAnimation.subscribe(this);

            box = new Rectangle((int)position.X, (int)position.Y, walkAnimation.FrameWidth, walkAnimation.FrameHeight);
        }