Project

General

Profile

« Previous | Next » 

Revision 82eb152a

Added by Leszek Koltunski over 2 years ago

JsonReader (?) finished: the creator app can now read objects from JSON files.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
22 22
import static org.distorted.objectlib.main.Movement12.COS54;
23 23
import static org.distorted.objectlib.main.Movement12.SIN54;
24 24

  
25
import android.content.res.Resources;
25
import java.io.InputStream;
26 26

  
27 27
import org.distorted.library.type.Static3D;
28 28
import org.distorted.library.type.Static4D;
29 29
import org.distorted.library.main.QuatHelper;
30 30

  
31
import org.distorted.objectlib.R;
32 31
import org.distorted.objectlib.main.ObjectControl;
33 32
import org.distorted.objectlib.main.ObjectType;
34 33
import org.distorted.objectlib.helpers.ObjectShape;
......
43 42

  
44 43
///////////////////////////////////////////////////////////////////////////////////////////////////
45 44

  
46
  public TwistyMegaminx(int[] numL, Static4D quat, Static3D move, Resources res)
45
  public TwistyMegaminx(int[] numL, Static4D quat, Static3D move, InputStream stream)
47 46
    {
48
    super(numL, quat, move, res);
47
    super(numL, quat, move, stream);
49 48
    }
50 49

  
51 50
///////////////////////////////////////////////////////////////////////////////////////////////////
......
69 68
    return numLayers-2;
70 69
    }
71 70

  
72
///////////////////////////////////////////////////////////////////////////////////////////////////
73

  
74
  protected int getResource(int[] numLayers)
75
    {
76
    switch(numLayers[0])
77
      {
78
      case 3: return R.raw.mega_3;
79
      case 5: return R.raw.mega_5;
80
      }
81

  
82
    return 0;
83
    }
84

  
85 71
///////////////////////////////////////////////////////////////////////////////////////////////////
86 72

  
87 73
  public int getNumStickerTypes(int[] numLayers)

Also available in: Unified diff