Small fix
This commit is contained in:
@@ -253,6 +253,11 @@ int32 ParticleEffect::GetParticlesCount() const
|
|||||||
return Instance.GetParticlesCount();
|
return Instance.GetParticlesCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ParticleEffect::GetIsPlaying() const
|
||||||
|
{
|
||||||
|
return _isPlaying;
|
||||||
|
}
|
||||||
|
|
||||||
void ParticleEffect::ResetSimulation()
|
void ParticleEffect::ResetSimulation()
|
||||||
{
|
{
|
||||||
Instance.ClearState();
|
Instance.ClearState();
|
||||||
@@ -278,7 +283,7 @@ void ParticleEffect::UpdateSimulation(bool singleFrame)
|
|||||||
void ParticleEffect::Play(bool reset)
|
void ParticleEffect::Play(bool reset)
|
||||||
{
|
{
|
||||||
_play = true;
|
_play = true;
|
||||||
IsPlaying = true;
|
_isPlaying = true;
|
||||||
|
|
||||||
if (reset)
|
if (reset)
|
||||||
ResetSimulation();
|
ResetSimulation();
|
||||||
@@ -289,13 +294,13 @@ void ParticleEffect::Play(bool reset)
|
|||||||
void ParticleEffect::Pause()
|
void ParticleEffect::Pause()
|
||||||
{
|
{
|
||||||
_play = false;
|
_play = false;
|
||||||
IsPlaying = false;
|
_isPlaying = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParticleEffect::Stop()
|
void ParticleEffect::Stop()
|
||||||
{
|
{
|
||||||
_play = false;
|
_play = false;
|
||||||
IsPlaying = false;
|
_isPlaying = false;
|
||||||
ResetSimulation();
|
ResetSimulation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -185,6 +185,7 @@ private:
|
|||||||
Array<ParticleEffectParameter> _parameters; // Cached for scripting API
|
Array<ParticleEffectParameter> _parameters; // Cached for scripting API
|
||||||
Array<ParameterOverride> _parametersOverrides; // Cached parameter modifications to be applied to the parameters
|
Array<ParameterOverride> _parametersOverrides; // Cached parameter modifications to be applied to the parameters
|
||||||
bool _play = false;
|
bool _play = false;
|
||||||
|
bool _isPlaying = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -241,12 +242,6 @@ public:
|
|||||||
API_FIELD(Attributes="EditorDisplay(\"Particle Effect\"), DefaultValue(true), EditorOrder(60)")
|
API_FIELD(Attributes="EditorDisplay(\"Particle Effect\"), DefaultValue(true), EditorOrder(60)")
|
||||||
bool PlayOnStart = true;
|
bool PlayOnStart = true;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// If true, the particle effect is playing.
|
|
||||||
/// </summary>
|
|
||||||
API_FIELD()
|
|
||||||
bool IsPlaying = false;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If true, the particle simulation will be updated even when an actor cannot be seen by any camera. Otherwise, the simulation will stop running when the actor is off-screen.
|
/// If true, the particle simulation will be updated even when an actor cannot be seen by any camera. Otherwise, the simulation will stop running when the actor is off-screen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -339,6 +334,11 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
API_PROPERTY() int32 GetParticlesCount() const;
|
API_PROPERTY() int32 GetParticlesCount() const;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets whether or not the particle effect is playing.
|
||||||
|
/// </summary>
|
||||||
|
API_PROPERTY(Attributes="NoSerialize, HideInEditor") bool GetIsPlaying() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resets the particles simulation state (clears the instance state data but preserves the instance parameters values).
|
/// Resets the particles simulation state (clears the instance state data but preserves the instance parameters values).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user