Revision ecf3d6e3
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/effects/BaseEffect.java | ||
---|---|---|
30 | 30 |
import org.distorted.objectlib.effects.solve.SolveEffect; |
31 | 31 |
import org.distorted.objectlib.effects.win.WinEffect; |
32 | 32 |
import org.distorted.objectlib.R; |
33 |
import org.distorted.objectlib.main.ObjectPreRender; |
|
33 | 34 |
|
34 | 35 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 36 |
|
... | ... | |
197 | 198 |
|
198 | 199 |
//////////////////////////////////////////////////////////////////////////////// |
199 | 200 |
|
200 |
public long startEffect(DistortedScreen screen, EffectController cont) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
|
|
201 |
public long startEffect(DistortedScreen screen, ObjectPreRender pre) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
|
|
201 | 202 |
{ |
202 | 203 |
Method method1 = mClass.getDeclaredMethod("create", int.class); |
203 | 204 |
|
204 | 205 |
Object value1 = method1.invoke(null,mCurrentType); |
205 | 206 |
BaseEffect baseEffect = (BaseEffect)value1; |
206 | 207 |
|
207 |
Method method2 = mClass.getDeclaredMethod("start", int.class, DistortedScreen.class, EffectController.class);
|
|
208 |
Method method2 = mClass.getDeclaredMethod("start", int.class, DistortedScreen.class, ObjectPreRender.class);
|
|
208 | 209 |
|
209 | 210 |
Integer translated = translatePos(mCurrentPos)+1; |
210 |
Object value2 = method2.invoke(baseEffect,translated,screen,cont);
|
|
211 |
Object value2 = method2.invoke(baseEffect,translated,screen,pre);
|
|
211 | 212 |
return (Long)value2; |
212 | 213 |
} |
213 | 214 |
|
Also available in: Unified diff
1) introduce possibility to move objects, i.e. display them not in the middle of the screen (not fully functional yet)
2) do away with unneeded any more interface 'EffectController' - since ObjectPreRender is the only implementation now.