Revision 20dbec0e
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueuePostprocess.java | ||
---|---|---|
34 | 34 |
import org.distorted.library.main.InternalRenderState; |
35 | 35 |
import org.distorted.library.main.InternalSurface; |
36 | 36 |
import org.distorted.library.mesh.MeshBase; |
37 |
import org.distorted.library.message.EffectMessage; |
|
38 | 37 |
import org.distorted.library.message.EffectMessageSender; |
39 | 38 |
import org.distorted.library.program.DistortedProgram; |
40 | 39 |
|
... | ... | |
60 | 59 |
|
61 | 60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
62 | 61 |
|
63 |
EffectQueuePostprocess(long id)
|
|
62 |
EffectQueuePostprocess() |
|
64 | 63 |
{ |
65 |
super(id,NUM_UNIFORMS,INDEX );
|
|
64 |
super(NUM_UNIFORMS,INDEX ); |
|
66 | 65 |
} |
67 | 66 |
|
68 | 67 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
88 | 87 |
|
89 | 88 |
if( mEffects[i].compute(mUniforms, NUM_UNIFORMS*i, mCurrentDuration[i], step) ) |
90 | 89 |
{ |
91 |
for(int j=0; j<mNumListeners; j++) |
|
92 |
EffectMessageSender.newMessage( mListeners.get(j), EffectMessage.EFFECT_FINISHED, mEffects[i].getID(), mDistortedEffectsID); |
|
90 |
EffectMessageSender.newMessage(mEffects[i]); |
|
93 | 91 |
} |
94 | 92 |
|
95 | 93 |
halo = (int)mUniforms[NUM_UNIFORMS*i]; |
Also available in: Unified diff
Simplify the way applications can get notifications when an effect finishes.
Now, instead of the 'DistortedEffects.(de)registerForNotifications()' 2 APIs, we call a single 'Effect.notifyWhenFinished()'.