17#ifndef _FGE_C_OBJANIM_HPP_INCLUDED
18#define _FGE_C_OBJANIM_HPP_INCLUDED
20#include "FastEngine/fge_extern.hpp"
21#include "C_object.hpp"
22#include "FastEngine/accessor/C_animation.hpp"
26#define FGE_OBJANIM_DEFAULT_TICKDURATION_MS 10
27#define FGE_OBJANIM_CLASSNAME "FGE:OBJ:ANIM"
45 void setPause(
bool flag);
46 bool isPaused()
const;
50 void setTickDuration(std::chrono::milliseconds
const& tms);
51 std::chrono::microseconds
const& getTickDuration()
const;
59 FGE_OBJ_UPDATE_DECLARE
74 void updatePositions();
75 void updateTexCoords();
81 std::chrono::microseconds g_tickDuration;
82 std::chrono::microseconds g_nextFrameTime;
Class that represent/handle an animation.
Definition C_animation.hpp:36
Definition C_color.hpp:35
Definition C_objAnim.hpp:33
char const * getClassName() const override
Get the unique class name of the object.
void pack(fge::net::Packet &pck) override
Pack the object into a packet.
char const * getReadableClassName() const override
Get a readable version of the class name.
void save(nlohmann::json &jsonObject, fge::Scene *scene) override
Save the object to a json object.
void unpack(fge::net::Packet const &pck) override
Unpack the object from a packet.
fge::RectFloat getGlobalBounds() const override
Get the global bounds of the object.
fge::RectFloat getLocalBounds() const override
Get the local bounds of the object (without any transformations)
void load(nlohmann::json &jsonObject, fge::Scene *scene) override
Load the object from a json object.
The Object class is the base class for all objects in the engine.
Definition C_object.hpp:102
A scene contain a collection of object and handle them.
Definition C_scene.hpp:450
Definition C_packet.hpp:70
Definition C_vertexBuffer.hpp:45