Skip to content

add pause and resume methods to Animation #97

@shikaan

Description

@shikaan

I found myself reimplementing the following

  void pauseAnimation() {
    auto a = getAnimation();
    a.setSlowdownCount(STOP_ANIMATION_SLOWDOWN);
    setAnimation(a);
  }

  void resumeAnimation() {
    auto a = getAnimation();
    a.setSlowdownCount(a.getSprite()->getDuration());
    setAnimation(a);
  }

Over and over. It can legitimately be part of Animation

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions