|
@@ -88,8 +88,6 @@ public:
|
|
|
/// Handle enabled/disabled state change.
|
|
/// Handle enabled/disabled state change.
|
|
|
virtual void OnSetEnabled();
|
|
virtual void OnSetEnabled();
|
|
|
|
|
|
|
|
- /// Set emission enabled.
|
|
|
|
|
- void SetEmissionEnabled(bool enable);
|
|
|
|
|
/// Set particle effect.
|
|
/// Set particle effect.
|
|
|
void SetEffect(ParticleEffect2D* effect);
|
|
void SetEffect(ParticleEffect2D* effect);
|
|
|
/// Set sprite.
|
|
/// Set sprite.
|
|
@@ -99,8 +97,6 @@ public:
|
|
|
/// Set max particles.
|
|
/// Set max particles.
|
|
|
void SetMaxParticles(unsigned maxParticles);
|
|
void SetMaxParticles(unsigned maxParticles);
|
|
|
|
|
|
|
|
- /// Return emission state.
|
|
|
|
|
- bool GetEmissionEnabled() const;
|
|
|
|
|
/// Return particle effect.
|
|
/// Return particle effect.
|
|
|
ParticleEffect2D* GetEffect() const;
|
|
ParticleEffect2D* GetEffect() const;
|
|
|
/// Return sprite.
|
|
/// Return sprite.
|
|
@@ -121,6 +117,15 @@ public:
|
|
|
/// Return sprite attribute.
|
|
/// Return sprite attribute.
|
|
|
ResourceRef GetSpriteAttr() const;
|
|
ResourceRef GetSpriteAttr() const;
|
|
|
|
|
|
|
|
|
|
+ // ATOMIC BEGIN
|
|
|
|
|
+
|
|
|
|
|
+ /// Set emission state.
|
|
|
|
|
+ void SetEmitting(bool enable);
|
|
|
|
|
+ /// Return emission state.
|
|
|
|
|
+ bool IsEmitting() const;
|
|
|
|
|
+
|
|
|
|
|
+ // ATOMIC END
|
|
|
|
|
+
|
|
|
private:
|
|
private:
|
|
|
/// Handle scene being assigned.
|
|
/// Handle scene being assigned.
|
|
|
virtual void OnSceneSet(Scene* scene);
|
|
virtual void OnSceneSet(Scene* scene);
|
|
@@ -141,15 +146,13 @@ private:
|
|
|
/// Update particle.
|
|
/// Update particle.
|
|
|
void UpdateParticle(Particle2D& particle, float timeStep, const Vector3& worldPosition, float worldScale);
|
|
void UpdateParticle(Particle2D& particle, float timeStep, const Vector3& worldPosition, float worldScale);
|
|
|
|
|
|
|
|
- /// Emission enabled.
|
|
|
|
|
- bool emissionEnabled_;
|
|
|
|
|
/// Particle effect.
|
|
/// Particle effect.
|
|
|
SharedPtr<ParticleEffect2D> effect_;
|
|
SharedPtr<ParticleEffect2D> effect_;
|
|
|
/// Sprite.
|
|
/// Sprite.
|
|
|
SharedPtr<Sprite2D> sprite_;
|
|
SharedPtr<Sprite2D> sprite_;
|
|
|
/// Blend mode.
|
|
/// Blend mode.
|
|
|
BlendMode blendMode_;
|
|
BlendMode blendMode_;
|
|
|
- /// Nummber of particles.
|
|
|
|
|
|
|
+ /// Number of particles.
|
|
|
unsigned numParticles_;
|
|
unsigned numParticles_;
|
|
|
/// Emission time.
|
|
/// Emission time.
|
|
|
float emissionTime_;
|
|
float emissionTime_;
|
|
@@ -161,6 +164,14 @@ private:
|
|
|
Vector3 boundingBoxMinPoint_;
|
|
Vector3 boundingBoxMinPoint_;
|
|
|
/// Bounding box max point.
|
|
/// Bounding box max point.
|
|
|
Vector3 boundingBoxMaxPoint_;
|
|
Vector3 boundingBoxMaxPoint_;
|
|
|
|
|
+
|
|
|
|
|
+ // ATOMIC BEGIN
|
|
|
|
|
+
|
|
|
|
|
+ /// Emission enabled.
|
|
|
|
|
+ bool emitting_;
|
|
|
|
|
+
|
|
|
|
|
+ // ATOMIC END
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
}
|
|
}
|