Skip to content

Ch 8. Animation update while loop #16

@kyuhyunp

Description

@kyuhyunp

In Chapter 8 of SFML Game Development, Animation is introduced. Although Aircraft's constructor sets mExplosion.setNumFrames(16), the Animation's update function has a while loop that allows mCurrentFrame == mNumFrames in while (mElapsedTime >= timePerFrame && (mCurrentFrame <= mNumFrames || mRepeat)) This would cause some problem when textureRect.top += textureRect.height;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions