Revision 5a4d4fba
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/effects/BaseEffect.java | ||
---|---|---|
29 | 29 |
import org.distorted.effects.win.WinEffect; |
30 | 30 |
import org.distorted.library.main.DistortedScreen; |
31 | 31 |
import org.distorted.main.R; |
32 |
import org.distorted.main.RubikPostRender;
|
|
32 |
import org.distorted.main.RubikPreRender;
|
|
33 | 33 |
|
34 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 35 |
|
... | ... | |
197 | 197 |
|
198 | 198 |
//////////////////////////////////////////////////////////////////////////////// |
199 | 199 |
|
200 |
public long startEffect(DistortedScreen screen, RubikPostRender post) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
|
|
200 |
public long startEffect(DistortedScreen screen, RubikPreRender pre) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
|
|
201 | 201 |
{ |
202 | 202 |
Method method1 = mClass.getDeclaredMethod("create", int.class); |
203 | 203 |
|
204 | 204 |
Object value1 = method1.invoke(null,mCurrentType); |
205 | 205 |
BaseEffect baseEffect = (BaseEffect)value1; |
206 | 206 |
|
207 |
Method method2 = mClass.getDeclaredMethod("start", int.class, DistortedScreen.class, RubikPostRender.class);
|
|
207 |
Method method2 = mClass.getDeclaredMethod("start", int.class, DistortedScreen.class, RubikPreRender.class);
|
|
208 | 208 |
|
209 | 209 |
Integer translated = translatePos(mCurrentPos)+1; |
210 |
Object value2 = method2.invoke(baseEffect,translated,screen,post);
|
|
210 |
Object value2 = method2.invoke(baseEffect,translated,screen,pre);
|
|
211 | 211 |
return (Long)value2; |
212 | 212 |
} |
213 | 213 |
|
Also available in: Unified diff
Convert the PostRender to a PreRender, called before we render.
This makes more sense as this way things are prepared for the very first render.