mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Add Animation Table logic
This commit is contained in:
@@ -104,6 +104,22 @@ public:
|
||||
*/
|
||||
std::vector<Effect*>& GetEffects();
|
||||
|
||||
/**
|
||||
* Verifies that an animation can be played on this entity by checking
|
||||
* if it has the animation assigned to its group. If it does, the animation is echo'd
|
||||
* down to all clients to be played and the duration of the played animation is returned.
|
||||
* If the animation did not exist or the function was called in an invalid state, 0 is returned.
|
||||
*
|
||||
* The logic here matches the exact client logic.
|
||||
*
|
||||
* @param self The entity that wants to play an animation
|
||||
* @param animation The animation_type (animationID in the client) to be played.
|
||||
* @param sendAnimation Whether or not to echo the animation down to all clients.
|
||||
* @param priority The priority of the animation. Only used if sendAnimation is true.
|
||||
* @param scale The scale of the animation. Only used if sendAnimation is true.
|
||||
*
|
||||
* @return The duration of the animation that was played.
|
||||
*/
|
||||
static float DoAnimation(Entity* self, const std::string& animation, bool sendAnimation, float priority = 0.0f, float scale = 1.0f);
|
||||
|
||||
static float PlayAnimation(Entity* self, const std::u16string& animation, float priority = 0.0f, float scale = 1.0f);
|
||||
|
Reference in New Issue
Block a user