Project

General

Profile

« Previous | Next » 

Revision 305f368e

Added by Leszek Koltunski almost 2 years ago

correct the stars animation.
corect number of stars earned in level 8.

View differences:

src/main/java/org/distorted/external/RubikScores.java
273 273

  
274 274
  public int computeNumStars(int level)
275 275
    {
276
    return level>=LEVELS_SHOWN ? 50 : level;
276
    return level>LEVELS_SHOWN ? 50 : level;
277 277
    }
278 278

  
279 279
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/overlays/OverlayStars.java
34 34
import org.distorted.library.type.Dynamic1D;
35 35
import org.distorted.library.type.Dynamic2D;
36 36
import org.distorted.library.type.Dynamic3D;
37
import org.distorted.library.type.Dynamic4D;
37 38
import org.distorted.library.type.Static1D;
38 39
import org.distorted.library.type.Static2D;
39 40
import org.distorted.library.type.Static3D;
......
268 269
      mScreen = screen;
269 270
      mListener= listener;
270 271
      DataStars stars = (DataStars)data;
271
      mTotalStars = 7;//stars.getTotal();
272
      mTotalStars = stars.getTotal();
272 273
      mNewStars   = stars.getNew();
273 274
      Resources res = stars.getResources();
274 275
      mWidth = mScreen.getWidth();
......
292 293
   private PostprocessEffectGlow constructGlow(boolean firstPhase)
293 294
      {
294 295
      Dynamic2D haloRadius = new Dynamic2D(DUR_GLO,0.5f);
295
      Static2D point0 = new Static2D( 0, 0);
296
      Static2D point1 = new Static2D(15,50);
296
      Static2D point20 = new Static2D( 0, 0);
297
      Static2D point21 = new Static2D(15,50);
298
      Dynamic4D color = new Dynamic4D(DUR_GLO, 0.5f);
299
      Static4D point40 = new Static4D(1,1,1,0.0f);
300
      Static4D point41 = new Static4D(1,1,1,0.8f);
297 301

  
298 302
      if( firstPhase )
299 303
         {
300
         haloRadius.add(point0);
301
         haloRadius.add(point1);
304
         haloRadius.add(point20);
305
         haloRadius.add(point21);
306
         color.add(point40);
307
         color.add(point41);
302 308
         }
303 309
      else
304 310
         {
305
         haloRadius.add(point1);
306
         haloRadius.add(point0);
311
         haloRadius.add(point21);
312
         haloRadius.add(point20);
313
         color.add(point41);
314
         color.add(point40);
307 315
         }
308 316

  
309
      Static4D color = new Static4D(1,1,1,0.5f);
310

  
311 317
      PostprocessEffectGlow glow = new PostprocessEffectGlow(haloRadius,color);
312 318
      glow.setQuality(EffectQuality.MEDIUM);
313 319
      glow.notifyWhenFinished(this);

Also available in: Unified diff