Skip to content

Commit

Permalink
Adds the getCurrentFrameDimensions() function to the SpriteAnimation …
Browse files Browse the repository at this point in the history
…class.
  • Loading branch information
Valkryst committed Feb 21, 2019
1 parent 614c490 commit 8fae24e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/com/valkryst/V2DSprite/SpriteAnimation.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,14 @@ public void toPreviousFrame() {
public int getTotalFrames() {
return framePositions.length;
}

/**
* Retrieves the dimensions of the current frame.
*
* @return
* The dimensions of the current frame.
*/
public Dimension getCurrentFrameDimensions() {
return frameDimensions[curFrame];
}
}

0 comments on commit 8fae24e

Please sign in to comment.