title: Xna Animation with different height, width
body: <p>I'm currently creating animation with xna.
  I have no problem to animate spritesheet when the frame Height, Width and duration are the same between all the frames. </p>
  
  <p>But i didn't find it very flexible and i'd like to animate without a spritesheet of same frameHeight/Width and more importantly without constant duration.</p>
  
  <p>Is there any tutorials or code sample to learn this?</p>
  
  <p>EDIT:
  I think of something like this but i can't make it work:</p>
  
  <pre><code>    public void Update(GameTime gameTime)
      {
          if (elapsedTime &gt; frameTime)
          {
              currentFrame++;
              elapsedTime = 0;
          }
  
          sourceRect = new Rectangle(newpositionX, newpositionY, newframeWidth, newframeHeight);
          frametime = newframetime
     }
  enter code here
  </code></pre>
  
  <p>The difficulty is how to specify accurately the new position and the new frame time for each frame.</p>