mirror of https://github.com/axmolengine/axmol.git
Making CCMotionStreak _maxPoints framerate independent.
This commit is contained in:
parent
1b96b0bef8
commit
e0143167e6
|
@ -113,8 +113,10 @@ bool MotionStreak::initWithFade(float fade, float minSeg, float stroke, const Co
|
|||
|
||||
_stroke = stroke;
|
||||
_fadeDelta = 1.0f/fade;
|
||||
|
||||
_maxPoints = (int)(fade*60.0f)+2;
|
||||
|
||||
double fps = 1/Director::getInstance()->getAnimationInterval();
|
||||
_maxPoints = (int)(fade*fps)+2;
|
||||
|
||||
_nuPoints = 0;
|
||||
_pointState = (float *)malloc(sizeof(float) * _maxPoints);
|
||||
_pointVertexes = (Vec2*)malloc(sizeof(Vec2) * _maxPoints);
|
||||
|
|
Loading…
Reference in New Issue