mirror of https://github.com/axmolengine/axmol.git
Add fixed FPS function for particle system.
Useful for low-end devices.
This commit is contained in:
parent
27eecf1857
commit
9a175cb49b
|
@ -1723,16 +1723,6 @@ void ParticleSystem::resumeUpdate()
|
|||
_updatePaused = false;
|
||||
}
|
||||
|
||||
float ParticleSystem::getTimeScale()
|
||||
{
|
||||
return _timeScale;
|
||||
}
|
||||
|
||||
void ParticleSystem::setTimeScale(float scale)
|
||||
{
|
||||
_timeScale = scale;
|
||||
}
|
||||
|
||||
float ParticleSystem::getFixedFPS()
|
||||
{
|
||||
return _fixedFPS;
|
||||
|
@ -1743,4 +1733,14 @@ void ParticleSystem::setFixedFPS(float frameRate)
|
|||
_fixedFPS = frameRate;
|
||||
}
|
||||
|
||||
float ParticleSystem::getTimeScale()
|
||||
{
|
||||
return _timeScale;
|
||||
}
|
||||
|
||||
void ParticleSystem::setTimeScale(float scale)
|
||||
{
|
||||
_timeScale = scale;
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -1065,16 +1065,6 @@ public:
|
|||
/* Unpause the particles from being updated */
|
||||
virtual void resumeUpdate();
|
||||
|
||||
/** Gets the time scale of the particle system.
|
||||
@return Time scale of the particle system.
|
||||
*/
|
||||
virtual float getTimeScale();
|
||||
|
||||
/** Gets the time scale of the particle system.
|
||||
@param Time scale of the particle system. (default: 1.0)
|
||||
*/
|
||||
virtual void setTimeScale(float scale = 1.0F);
|
||||
|
||||
/** Gets the fixed frame rate count of the particle system.
|
||||
@return Fixed frame rate count of the particle system.
|
||||
*/
|
||||
|
@ -1085,6 +1075,16 @@ public:
|
|||
*/
|
||||
virtual void setFixedFPS(float frameRate = 0.0F);
|
||||
|
||||
/** Gets the time scale of the particle system.
|
||||
@return Time scale of the particle system.
|
||||
*/
|
||||
virtual float getTimeScale();
|
||||
|
||||
/** Gets the time scale of the particle system.
|
||||
@param Time scale of the particle system. (default: 1.0)
|
||||
*/
|
||||
virtual void setTimeScale(float scale = 1.0F);
|
||||
|
||||
protected:
|
||||
virtual void updateBlendFunc();
|
||||
|
||||
|
|
Loading…
Reference in New Issue