Revision 82eb152a
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java | ||
---|---|---|
22 | 22 |
import static org.distorted.objectlib.main.Movement.MOVEMENT_TETRAHEDRON; |
23 | 23 |
import static org.distorted.objectlib.main.Movement.TYPE_NOT_SPLIT; |
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 |
|
30 |
import org.distorted.objectlib.R; |
|
31 | 30 |
import org.distorted.objectlib.main.Movement4; |
32 | 31 |
import org.distorted.objectlib.main.ObjectControl; |
33 | 32 |
import org.distorted.objectlib.main.ObjectType; |
... | ... | |
56 | 55 |
|
57 | 56 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
58 | 57 |
|
59 |
public TwistyPyraminx(int[] numL, Static4D quat, Static3D move, Resources res)
|
|
58 |
public TwistyPyraminx(int[] numL, Static4D quat, Static3D move, InputStream stream)
|
|
60 | 59 |
{ |
61 |
super(numL, numL[0], quat, move, res);
|
|
60 |
super(numL, numL[0], quat, move, stream);
|
|
62 | 61 |
} |
63 | 62 |
|
64 | 63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
74 | 73 |
return mStates; |
75 | 74 |
} |
76 | 75 |
|
77 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
78 |
|
|
79 |
protected int getResource(int[] numLayers) |
|
80 |
{ |
|
81 |
switch(numLayers[0]) |
|
82 |
{ |
|
83 |
case 3: return R.raw.pyra_3; |
|
84 |
case 4: return R.raw.pyra_4; |
|
85 |
case 5: return R.raw.pyra_5; |
|
86 |
} |
|
87 |
|
|
88 |
return 0; |
|
89 |
} |
|
90 |
|
|
91 | 76 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
92 | 77 |
|
93 | 78 |
private void initializeQuats() |
Also available in: Unified diff
JsonReader (?) finished: the creator app can now read objects from JSON files.