Revision b63bedcc
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/main/ObjectType.java | ||
---|---|---|
89 | 89 |
|
90 | 90 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
91 | 91 |
|
92 |
ObjectType(Class<? extends TwistyObject> clazz, int[] numLayers, int scrambles, int sIcon, int mIcon, int bIcon, int hIcon) |
|
93 |
{ |
|
94 |
mClass = clazz; |
|
95 |
mNumLayers = numLayers; |
|
96 |
mNumScrambles= scrambles; |
|
97 |
mSmallIcon = sIcon; |
|
98 |
mMediumIcon = mIcon; |
|
99 |
mBigIcon = bIcon; |
|
100 |
mHugeIcon = hIcon; |
|
101 |
} |
|
102 |
|
|
103 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
104 |
// PUBLIC API |
|
105 |
|
|
92 | 106 |
public static ObjectType getObject(int ordinal) |
93 | 107 |
{ |
94 | 108 |
return ordinal>=0 && ordinal<NUM_OBJECTS ? objects[ordinal] : CUBE_3; |
... | ... | |
106 | 120 |
return -1; |
107 | 121 |
} |
108 | 122 |
|
109 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
110 |
|
|
111 |
ObjectType(Class<? extends TwistyObject> clazz, int[] numLayers, int scrambles, int sIcon, int mIcon, int bIcon, int hIcon) |
|
112 |
{ |
|
113 |
mClass = clazz; |
|
114 |
mNumLayers = numLayers; |
|
115 |
mNumScrambles= scrambles; |
|
116 |
mSmallIcon = sIcon; |
|
117 |
mMediumIcon = mIcon; |
|
118 |
mBigIcon = bIcon; |
|
119 |
mHugeIcon = hIcon; |
|
120 |
} |
|
121 |
|
|
122 | 123 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
123 | 124 |
|
124 | 125 |
public int getIconID(int size) |
Also available in: Unified diff
Progress replacing the enum ObjetType with the class RubikObjectList.