aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Animator.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-02 10:18:08 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-02 10:18:08 +0100
commit54ab44e3508d526be6275378e5979290ec188d6f (patch)
treec8768edc0066d5149f1e7088e6fc82e3d51671b3 /src/crepe/api/Animator.cpp
parent3afcae9dd472ead2d5f2b667fc6479f8ee6db10c (diff)
comments i animator and sprite. added sprite indepentdent scale and angle
Diffstat (limited to 'src/crepe/api/Animator.cpp')
-rw-r--r--src/crepe/api/Animator.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/crepe/api/Animator.cpp b/src/crepe/api/Animator.cpp
index 7fe49ee..0b7e86d 100644
--- a/src/crepe/api/Animator.cpp
+++ b/src/crepe/api/Animator.cpp
@@ -24,3 +24,20 @@ Animator::Animator(game_object_id_t id, Sprite & ss, int row, int col, int col_a
= static_cast<double>(this->spritesheet.mask.w) / this->spritesheet.mask.h;
}
Animator::~Animator() { dbg_trace(); }
+
+void Animator::loop() { this->looping = true; }
+void Animator::play() { this->active = true; }
+void Animator::pause() { this->active = false; }
+void Animator::stop() {
+ this->active = false;
+ this->curr_col = 0;
+ this->curr_row = 0;
+}
+void Animator::set_fps(int fps) { this->fps = fps; }
+void Animator::set_cycle_range(int start, int end) {
+ this->cycle_start = start, this->cycle_end = end;
+}
+void Animator::set_anim(int col) {
+ this->curr_row = 0;
+ this->curr_col = col;
+}