1
0
forked from 0ad/0ad
0ad/source/graphics/UnitAnimation.h
Ykkrosh bdbb2bcb16 # Updated unit animation code.
Added UnitAnimation class, to act as the interface between the entity
and actor. (Currently doesn't work very well, but it does make
animations loop smoothly and sometimes kind of makes them stay
synchronised.)
Fixed corpse animation - it now plays the final frame of the death
animation before turning static.
Fixed update/interpolate timings.
Added JS function saveProfileData.
Updated ffmpeg library.

This was SVN commit r4880.
2007-02-10 03:09:52 +00:00

29 lines
531 B
C++

#ifndef UNITANIMATION_H__
#define UNITANIMATION_H__
#include "ps/CStr.h"
class CUnit;
class CUnitAnimation : boost::noncopyable
{
public:
CUnitAnimation(CUnit& unit);
// (All times are measured in seconds)
void SetAnimationState(const CStr& name, bool once, float speed, bool keepSelection);
void SetAnimationSync(float timeUntilActionPos);
void Update(float time);
private:
CUnit& m_Unit;
CStr m_State;
bool m_Looping;
float m_Speed;
float m_OriginalSpeed;
float m_TimeToNextSync;
};
#endif // UNITANIMATION_H__