Public Member Functions

Tiny2D::Effect Class Reference

Particle effect instance. More...

#include <Tiny2D.h>

List of all members.

Public Member Functions

 Effect ()
 Constructs an empty effect.
 Effect (const Effect &other)
 Copy constructor; internally creates new effect instance object (with its own state) and increases reference count of the effect resource.
 ~Effect ()
 Destroys an effect immediately.
ResourceState GetState () const
 Gets resource state.
void operator= (const Effect &other)
 Copy operator; internally creates new effect instance object (with its own state) and increases reference count of the effect resource.
bool Create (const std::string &path, const Vec2 &pos=Vec2(0.0f, 0.0f), float rotation=0.0f, bool immediate=true)
 Create an effect at given position and with given rotation; 'immediate' set to true indicates to load it synchronously.
void Destroy ()
 Starts destruction of an effect; the effect will live until the last particle of it is alive; if an effect is endless it will be destroyed immediately.
void Update (float deltaTime)
 Updates effect by given delta time.
void Draw ()
 Draws an effect.
void SetPosition (const Vec2 &pos)
 Sets effect position.
void SetRotation (float rotation)
 Sets effect rotation.
void SetScale (float scale)
 Sets effect scale.
void SetSpawnCountMultiplier (float multiplier)
 Sets effect spawn count multiplier (defaults to 1.0f); this is getting applied to all of its emitters.

Detailed Description

Particle effect instance.


Constructor & Destructor Documentation

Tiny2D::Effect::Effect (  )

Constructs an empty effect.

Tiny2D::Effect::Effect ( const Effect other )

Copy constructor; internally creates new effect instance object (with its own state) and increases reference count of the effect resource.

Tiny2D::Effect::~Effect (  )

Destroys an effect immediately.


Member Function Documentation

bool Tiny2D::Effect::Create ( const std::string &  path,
const Vec2 pos = Vec2(0.0f, 0.0f),
float  rotation = 0.0f,
bool  immediate = true 
)

Create an effect at given position and with given rotation; 'immediate' set to true indicates to load it synchronously.

void Tiny2D::Effect::Destroy (  )

Starts destruction of an effect; the effect will live until the last particle of it is alive; if an effect is endless it will be destroyed immediately.

void Tiny2D::Effect::Draw (  )

Draws an effect.

ResourceState Tiny2D::Effect::GetState (  ) const

Gets resource state.

void Tiny2D::Effect::operator= ( const Effect other )

Copy operator; internally creates new effect instance object (with its own state) and increases reference count of the effect resource.

void Tiny2D::Effect::SetPosition ( const Vec2 pos )

Sets effect position.

void Tiny2D::Effect::SetRotation ( float  rotation )

Sets effect rotation.

void Tiny2D::Effect::SetScale ( float  scale )

Sets effect scale.

void Tiny2D::Effect::SetSpawnCountMultiplier ( float  multiplier )

Sets effect spawn count multiplier (defaults to 1.0f); this is getting applied to all of its emitters.

void Tiny2D::Effect::Update ( float  deltaTime )

Updates effect by given delta time.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines