Skip to content

Commit 36ed171

Browse files
committed
Adjust frame length calculation
1 parent fd9832c commit 36ed171

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/GateEngine/ECS/2D Specific/Sprite/SpriteComponent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public final class SpriteComponent: Component {
116116
let startFrame = (animation.spriteSheetStart.y * columns) + animation.spriteSheetStart.x
117117
let endFrame = {
118118
if let frameCount = animation.frameCount {
119-
return startFrame + (frameCount - 1)
119+
return startFrame + frameCount
120120
}
121121
let framesInAnimation = (columns * rows) - startFrame
122122
return framesInAnimation

0 commit comments

Comments
 (0)