示例#1
0
文件: Sprite.cpp 项目: ts14ic/TopDown
void animation::RepeatableAnimation::next_frame() {
    if (is_last_frame()) {
        _frame = 0;
    } else {
        ++_frame;
    }
}
示例#2
0
文件: Sprite.cpp 项目: ts14ic/TopDown
void animation::RepeatableAnimation::update() {
    if (is_frame_ended()) {
        next_frame();
        if (not is_last_frame()) {
            _timer.restart();
        }
    }
}
示例#3
0
文件: Sprite.cpp 项目: ts14ic/TopDown
bool animation::RepeatableAnimation::is_animation_ended() const {
    return is_last_frame();
}
示例#4
0
static bool is_last_task_frame(struct unwind_state *state)
{
	return is_last_frame(state) || is_last_aligned_frame(state) ||
	       is_last_ftrace_frame(state);
}