diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-06-15 18:52:26 +1000 |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2011-06-15 18:52:26 +1000 |
commit | fab0da3853efc5ef2f1a507f7d054b8a0dd3b9ac (patch) | |
tree | 56eeb5e2175c0abed7afb47821de0940ca7b2e52 /src/declarative/particles/qsgspritegoal.cpp | |
parent | 7b22f02961a97c0fa07127ea3ff26b8435a617b8 (diff) |
Rewrite particle system to cope with changing particle counts
And might do it again...
Caught up in this massive change were the following smaller ones:
-Some custom particle examples
-delegate property on ItemParticle and an example with it
Diffstat (limited to 'src/declarative/particles/qsgspritegoal.cpp')
-rw-r--r-- | src/declarative/particles/qsgspritegoal.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/particles/qsgspritegoal.cpp b/src/declarative/particles/qsgspritegoal.cpp index 8dc98ae314..c97bfd1f26 100644 --- a/src/declarative/particles/qsgspritegoal.cpp +++ b/src/declarative/particles/qsgspritegoal.cpp @@ -81,7 +81,7 @@ bool QSGSpriteGoalAffector::affectParticle(QSGParticleData *d, qreal dt) Q_UNUSED(dt); //TODO: Affect all engines QSGSpriteEngine *engine = 0; - foreach(QSGParticlePainter *p, m_system->m_groupData[d->group]->types) + foreach(QSGParticlePainter *p, m_system->m_groupData[d->group]->painters) if(qobject_cast<QSGImageParticle*>(p)) engine = qobject_cast<QSGImageParticle*>(p)->spriteEngine(); if(!engine) @@ -89,8 +89,8 @@ bool QSGSpriteGoalAffector::affectParticle(QSGParticleData *d, qreal dt) if(m_goalIdx == -2 || engine != m_lastEngine) updateStateIndex(engine); - if(engine->spriteState(d->particleIndex) != m_goalIdx){ - engine->setGoal(m_goalIdx, d->particleIndex, m_jump); + if(engine->spriteState(d->index) != m_goalIdx){ + engine->setGoal(m_goalIdx, d->index, m_jump); emit affected(QPointF(d->curX(), d->curY()));//###Expensive if unconnected? Move to Affector? return true; //Doesn't affect particle data, but necessary for onceOff } |