Project

General

Profile

« Previous | Next » 

Revision 7ba38dd4

Added by Leszek Koltunski over 2 years ago

Major change: separate the notion of a TwistyObject and its Node. Now,

1) the Node stays when we change objects (this makes transitions faster)
2) it's possible to just create an Object without adding it to the Screen (now app needs to explicitly create the Node and add it to its Screen itself)

View differences:

src/main/java/org/distorted/objectlib/effects/BaseEffect.java
25 25

  
26 26
import org.distorted.library.main.DistortedFramebuffer;
27 27

  
28
import org.distorted.library.main.DistortedNode;
28 29
import org.distorted.objectlib.effects.scramble.ScrambleEffect;
29 30
import org.distorted.objectlib.effects.objectchange.ObjectChangeEffect;
30 31
import org.distorted.objectlib.effects.solve.SolveEffect;
......
198 199

  
199 200
  ////////////////////////////////////////////////////////////////////////////////
200 201

  
201
    public long startEffect(DistortedFramebuffer frame, ObjectPreRender pre) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
202
    public long startEffect(ObjectPreRender pre) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
202 203
      {
203 204
      Method method1 = mClass.getDeclaredMethod("create", int.class);
204 205

  
205 206
      Object value1 = method1.invoke(null,mCurrentType);
206 207
      BaseEffect baseEffect = (BaseEffect)value1;
207 208

  
208
      Method method2 = mClass.getDeclaredMethod("start", int.class, DistortedFramebuffer.class, ObjectPreRender.class);
209
      Method method2 = mClass.getDeclaredMethod("start", int.class, ObjectPreRender.class);
209 210

  
210 211
      Integer translated = translatePos(mCurrentPos)+1;
211
      Object value2 = method2.invoke(baseEffect,translated,frame,pre);
212
      Object value2 = method2.invoke(baseEffect,translated,pre);
212 213
      return (Long)value2;
213 214
      }
214 215

  

Also available in: Unified diff