Added SetStateProperties to Sprite.

This commit is contained in:
Kyzentun
2015-01-09 23:56:11 -07:00
parent 0adc016681
commit 0a02dd2b7c
5 changed files with 105 additions and 7 deletions
+10 -7
View File
@@ -11,6 +11,14 @@ class RageTexture;
class Sprite: public Actor
{
public:
/** @brief The Sprite's present state. */
struct State
{
RectF rect;
/** @brief The number of "seconds to show". */
float fDelay;
};
Sprite();
Sprite( const Sprite &cpy );
virtual ~Sprite();
@@ -48,6 +56,8 @@ public:
int GetState() { return m_iCurState; }
virtual float GetAnimationLengthSeconds() const;
virtual void SetSecondsIntoAnimation( float fSeconds );
void SetStateProperties(const vector<State>& new_states)
{ m_States= new_states; }
RString GetTexturePath() const;
@@ -90,13 +100,6 @@ private:
RageTexture* m_pTexture;
/** @brief The Sprite's present state. */
struct State
{
RectF rect;
/** @brief The number of "seconds to show". */
float fDelay;
};
vector<State> m_States;
int m_iCurState;
/** @brief The number of seconds that have elapsed since we switched to this frame. */