23#define KTECH_DEFINITION
24#include "../ktech.hpp"
25#undef KTECH_DEFINITION
27#include "../world/object.hpp"
28#include "../engine/engine.hpp"
29#include "../engine/time/invocation.hpp"
42 enum class Type : uint8_t
63 inline Instruction(Type type,
size_t textureIndex,
Point pointData =
Point(0, 0))
64 : type(type), intData(textureIndex), pointData(pointData) {}
67 inline Instruction(Type type,
Point pointData)
68 : type(type), pointData(pointData) {}
72 : type(type), intData(time), timeMeasurement(timeMeasurement) {}
85 std::vector<Instruction> m_instructions;
Wrapper for animating an Objects and its Textures.
Definition animation.hpp:37
void Stop()
Stop animation by canceling the invoked instructions, and prepare for a re-Play().
Definition animation.cpp:134
Animation(Engine &engine, const ID< Object > &object, const std::vector< Instruction > &instructions)
Construct an Animation, that will not play just yet.
Definition animation.cpp:36
~Animation()
Safely cancels invoked animation instructions.
Definition animation.cpp:40
auto Play() -> bool
Play the Animation.
Definition animation.cpp:52
Engine & engine
Parent Engine
Definition animation.hpp:75
Complete engine containing all engine components.
Definition engine.hpp:41
Measurement
Time measurement.
Definition time.hpp:39
Serializable world structure identifier.
Definition id.hpp:38
2D vector, mostly used to store positions and directions.
Definition point.hpp:30
Calls a function after a given time.
Definition invocation.hpp:68