public void PlayAnimation(Animation animation)
        {
            if (Animation == animation)
            {
                return;
            }

            this.animation = animation;
            this.frameIndex = 0;
            this.time = 0.0f;
        }
        public void LoadContent()
        {
            Support2 = content.Load<Texture2D>("Gaara");

            idleAnimation = new Animation(Support2, 0.1f, true, 6);

            int positionX = (windowWidth / 4) - (Support2.Width / 8);
            int positionY = (windowHeight / 4) - (Support2.Height / 8);
            Support_2 = new Vector2((float)positionX, (float)positionY);

            spritePlayer.PlayAnimation(idleAnimation);
        }
Ejemplo n.º 3
0
        public void LoadContent()
        {
            player = content.Load<Texture2D>("Hulk");

            idleAnimation = new Animation(player, 0.1f, true, 6);

            int positionX = (windowWidth / 4) - (player.Width / 8);
            int positionY = (windowHeight / 4) - (player.Height / 8);
            playerPosition = new Vector2((float)positionX, (float)positionY);

            spritePlayer.PlayAnimation(idleAnimation);
        }
        public void LoadContent()
        {
            Support1 = content.Load<Texture2D>("Girl");

            idleAnimation = new Animation(Support1, 0.1f, true, 8);

            int positionX = (windowWidth / 2) - (Support1.Width / 4);
            int positionY = (windowHeight / 2) - (Support1.Height / 4);
            Support = new Vector2((float)positionX, (float)positionY);

            spritePlayer.PlayAnimation(idleAnimation);
        }