5 m_pAnimation->
Update(gameTime);
26 if (m_pSound) m_pSound->
Play();
virtual void SetPosition(const Vector2 position)
Sets the explosion's position.
virtual void Draw(SpriteBatch &spriteBatch)
Render the explosion.
virtual bool IsActive() const
Checks if the explosion is active.
virtual void Update(const GameTime &gameTime)
Update the explosion.
virtual void Activate(const Vector2 position, const float scale=1)
Activates the explosion.
virtual void Update(const GameTime &gameTime)
Updates the animation.
virtual void SetLoopCount(uint16_t loops=-1)
Sets how many times the animation will run before it stops.
virtual void Play()
Starts or resumes the animation.
virtual Region * GetFrame(const int index)
Gets a pointer to the indexed frame.
static const Color White
White.
Contains timing values for game updates and rendering.
static float GetRandomFloat()
Get a random number between zero and one.
static const float PI
Represents the value of pi.
Vector2 GetCenter()
The center position of the region.
Enables a group of sprites to be drawn using the same settings.
void Draw(const Texture *pTexture, const Vector2 position, const Region region, const Color color=Color::White, const Vector2 origin=Vector2::ZERO, const Vector2 scale=Vector2::ONE, const float rotation=0, const float drawDepth=0)
Adds a sprite to a batch of sprites to be rendered.
Defines a vector with 2 components (x and y).
static const Vector2 ONE
A vector with both of its components set to one.