2021-10-02 21:17:03 +03:00
|
|
|
//
|
|
|
|
// Created by Иван Ильин on 03.10.2021.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef SHOOTER_TIMELINE_H
|
|
|
|
#define SHOOTER_TIMELINE_H
|
|
|
|
|
|
|
|
#include "Animation.h"
|
|
|
|
|
2021-10-17 10:21:10 +03:00
|
|
|
class AnimationListTag {
|
|
|
|
private:
|
|
|
|
const std::string _name;
|
|
|
|
public:
|
|
|
|
explicit AnimationListTag(std::string name = "") : _name(std::move(name)) {}
|
|
|
|
[[nodiscard]] std::string str() const { return _name; }
|
|
|
|
|
|
|
|
bool operator==(const AnimationListTag& tag) const { return _name == tag._name; }
|
|
|
|
bool operator!=(const AnimationListTag& tag) const { return _name != tag._name; }
|
|
|
|
bool operator<(const AnimationListTag& tag) const { return _name < tag._name; }
|
|
|
|
};
|
|
|
|
|
2021-10-02 21:17:03 +03:00
|
|
|
namespace Timeline {
|
|
|
|
void update();
|
2021-10-17 10:21:10 +03:00
|
|
|
void animate(const AnimationListTag& listName, Animation* anim);
|
2021-10-02 21:17:03 +03:00
|
|
|
|
|
|
|
void deleteAllAnimations();
|
2021-10-17 10:21:10 +03:00
|
|
|
void deleteAnimationList(const AnimationListTag& listName);
|
2021-10-02 21:17:03 +03:00
|
|
|
|
2021-10-17 10:21:10 +03:00
|
|
|
[[nodiscard]] bool isInAnimList(const AnimationListTag& listName);
|
2021-10-02 21:17:03 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif //SHOOTER_TIMELINE_H
|