1 |
9530f6b0
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2 |
da56b12f
|
Leszek Koltunski
|
// Copyright 2022 Leszek Koltunski //
|
3 |
9530f6b0
|
Leszek Koltunski
|
// //
|
4 |
|
|
// This file is part of Magic Cube. //
|
5 |
|
|
// //
|
6 |
44fec653
|
Leszek Koltunski
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7 |
|
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8 |
9530f6b0
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9 |
|
|
|
10 |
7ee8337b
|
leszek
|
package org.distorted.playui;
|
11 |
|
|
|
12 |
|
|
import java.io.InputStream;
|
13 |
9530f6b0
|
Leszek Koltunski
|
|
14 |
972f9eae
|
Leszek Koltunski
|
import android.content.SharedPreferences;
|
15 |
9530f6b0
|
Leszek Koltunski
|
import android.os.Build;
|
16 |
|
|
import android.os.Bundle;
|
17 |
|
|
import android.util.DisplayMetrics;
|
18 |
f3563327
|
Leszek Koltunski
|
import android.view.DisplayCutout;
|
19 |
9530f6b0
|
Leszek Koltunski
|
import android.view.View;
|
20 |
|
|
import android.view.ViewGroup;
|
21 |
|
|
import android.view.WindowManager;
|
22 |
|
|
import android.widget.LinearLayout;
|
23 |
|
|
|
24 |
|
|
import androidx.appcompat.app.AppCompatActivity;
|
25 |
ada8ab26
|
leszek
|
import androidx.preference.PreferenceManager;
|
26 |
9530f6b0
|
Leszek Koltunski
|
|
27 |
18b0ae9c
|
leszek
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
28 |
|
|
|
29 |
c02235d5
|
leszek
|
import org.distorted.dialogs.RubikDialogScores;
|
30 |
9530f6b0
|
Leszek Koltunski
|
import org.distorted.library.main.DistortedLibrary;
|
31 |
50e6c5d6
|
Leszek Koltunski
|
import org.distorted.objectlib.main.InitAssets;
|
32 |
9530f6b0
|
Leszek Koltunski
|
import org.distorted.objectlib.main.ObjectControl;
|
33 |
7cb8d4b0
|
Leszek Koltunski
|
import org.distorted.objectlib.main.TwistyObject;
|
34 |
7ee8337b
|
leszek
|
import org.distorted.dialogs.RubikDialogError;
|
35 |
|
|
import org.distorted.external.RubikFiles;
|
36 |
|
|
import org.distorted.main.MainActivity;
|
37 |
|
|
import org.distorted.main.R;
|
38 |
|
|
import org.distorted.objects.RubikObject;
|
39 |
|
|
import org.distorted.objects.RubikObjectList;
|
40 |
|
|
import org.distorted.os.OSInterface;
|
41 |
9530f6b0
|
Leszek Koltunski
|
|
42 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
43 |
|
|
|
44 |
c02235d5
|
leszek
|
public class PlayActivity extends AppCompatActivity implements RubikDialogScores.ScoresInvoker
|
45 |
9530f6b0
|
Leszek Koltunski
|
{
|
46 |
15ed3429
|
leszek
|
public static final int FLAGS = MainActivity.FLAGS;
|
47 |
|
|
public static final float TITLE_TEXT_SIZE= 0.060f;
|
48 |
c9f72ca3
|
leszek
|
private static final int ACTIVITY_NUMBER = 6;
|
49 |
1c04d054
|
leszek
|
private static final float RATIO_BAR = MainActivity.RATIO_BAR;
|
50 |
ada8ab26
|
leszek
|
private static final float RATIO_INSET = 0.09f;
|
51 |
15ed3429
|
leszek
|
|
52 |
|
|
private static final String KEY_FREE = "movesController_free";
|
53 |
|
|
private static final String KEY_SOLV = "movesController_solv";
|
54 |
9530f6b0
|
Leszek Koltunski
|
|
55 |
|
|
private static int mScreenWidth, mScreenHeight;
|
56 |
|
|
private int mCurrentApiVersion;
|
57 |
88b94310
|
Leszek Koltunski
|
private String mObjectName;
|
58 |
7ee8337b
|
leszek
|
private int mNumScrambles;
|
59 |
aa622165
|
Leszek Koltunski
|
private int mHeightUpperBar;
|
60 |
7ee8337b
|
leszek
|
private boolean mObjectLocal;
|
61 |
|
|
private int mObjectOrdinal;
|
62 |
7bb30586
|
leszek
|
private int mLevel;
|
63 |
7ee8337b
|
leszek
|
private boolean mModeFree;
|
64 |
e9397ae9
|
leszek
|
private boolean mJustStarted;
|
65 |
18b0ae9c
|
leszek
|
private FirebaseAnalytics mFirebaseAnalytics;
|
66 |
9530f6b0
|
Leszek Koltunski
|
|
67 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
68 |
|
|
|
69 |
|
|
@Override
|
70 |
|
|
protected void onCreate(Bundle savedState)
|
71 |
|
|
{
|
72 |
|
|
super.onCreate(savedState);
|
73 |
|
|
DistortedLibrary.onCreate(ACTIVITY_NUMBER);
|
74 |
|
|
setTheme(R.style.MaterialThemeNoActionBar);
|
75 |
7ee8337b
|
leszek
|
setContentView(R.layout.play);
|
76 |
9530f6b0
|
Leszek Koltunski
|
|
77 |
e9397ae9
|
leszek
|
mJustStarted = true;
|
78 |
18b0ae9c
|
leszek
|
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
79 |
|
|
|
80 |
9530f6b0
|
Leszek Koltunski
|
Bundle b = getIntent().getExtras();
|
81 |
7ee8337b
|
leszek
|
|
82 |
|
|
if( b!=null )
|
83 |
|
|
{
|
84 |
7bb30586
|
leszek
|
mLevel = b.getInt("level");
|
85 |
7ee8337b
|
leszek
|
mObjectName = b.getString("name");
|
86 |
|
|
mNumScrambles = b.getInt("scrambles");
|
87 |
|
|
mObjectLocal = b.getBoolean("local");
|
88 |
|
|
mObjectOrdinal = b.getInt("ordinal");
|
89 |
|
|
}
|
90 |
|
|
else
|
91 |
|
|
{
|
92 |
97201782
|
leszek
|
mLevel = -1;
|
93 |
7ee8337b
|
leszek
|
mObjectName = "";
|
94 |
|
|
mNumScrambles = 0;
|
95 |
|
|
mObjectLocal = true;
|
96 |
|
|
mObjectOrdinal = 0;
|
97 |
|
|
}
|
98 |
9530f6b0
|
Leszek Koltunski
|
|
99 |
97201782
|
leszek
|
mModeFree = (mLevel<0);
|
100 |
|
|
|
101 |
9530f6b0
|
Leszek Koltunski
|
DisplayMetrics displaymetrics = new DisplayMetrics();
|
102 |
7fe59aa5
|
Leszek Koltunski
|
getWindowManager().getDefaultDisplay().getRealMetrics(displaymetrics);
|
103 |
9530f6b0
|
Leszek Koltunski
|
mScreenWidth =displaymetrics.widthPixels;
|
104 |
|
|
mScreenHeight=displaymetrics.heightPixels;
|
105 |
7fe59aa5
|
Leszek Koltunski
|
|
106 |
9530f6b0
|
Leszek Koltunski
|
hideNavigationBar();
|
107 |
|
|
cutoutHack();
|
108 |
|
|
computeBarHeights();
|
109 |
|
|
}
|
110 |
|
|
|
111 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
112 |
|
|
// this does not include possible insets
|
113 |
|
|
|
114 |
|
|
private void computeBarHeights()
|
115 |
|
|
{
|
116 |
7fe59aa5
|
Leszek Koltunski
|
int barHeight = (int)(mScreenHeight*RATIO_BAR);
|
117 |
f3563327
|
Leszek Koltunski
|
mHeightUpperBar = barHeight;
|
118 |
|
|
|
119 |
|
|
LinearLayout layoutTop = findViewById(R.id.upperBar);
|
120 |
|
|
LinearLayout layoutBot = findViewById(R.id.lowerBar);
|
121 |
|
|
|
122 |
|
|
ViewGroup.LayoutParams paramsTop = layoutTop.getLayoutParams();
|
123 |
|
|
paramsTop.height = mHeightUpperBar;
|
124 |
|
|
layoutTop.setLayoutParams(paramsTop);
|
125 |
|
|
ViewGroup.LayoutParams paramsBot = layoutBot.getLayoutParams();
|
126 |
aa622165
|
Leszek Koltunski
|
paramsBot.height = barHeight;
|
127 |
f3563327
|
Leszek Koltunski
|
layoutBot.setLayoutParams(paramsBot);
|
128 |
9530f6b0
|
Leszek Koltunski
|
}
|
129 |
|
|
|
130 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
131 |
|
|
|
132 |
|
|
private void hideNavigationBar()
|
133 |
|
|
{
|
134 |
|
|
mCurrentApiVersion = Build.VERSION.SDK_INT;
|
135 |
|
|
|
136 |
|
|
if(mCurrentApiVersion >= Build.VERSION_CODES.KITKAT)
|
137 |
|
|
{
|
138 |
|
|
final View decorView = getWindow().getDecorView();
|
139 |
|
|
|
140 |
|
|
decorView.setSystemUiVisibility(FLAGS);
|
141 |
|
|
|
142 |
|
|
decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener()
|
143 |
|
|
{
|
144 |
|
|
@Override
|
145 |
|
|
public void onSystemUiVisibilityChange(int visibility)
|
146 |
|
|
{
|
147 |
|
|
if((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0)
|
148 |
|
|
{
|
149 |
|
|
decorView.setSystemUiVisibility(FLAGS);
|
150 |
|
|
}
|
151 |
|
|
}
|
152 |
|
|
});
|
153 |
|
|
}
|
154 |
|
|
}
|
155 |
|
|
|
156 |
f3563327
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
157 |
|
|
|
158 |
|
|
@Override
|
159 |
|
|
public void onAttachedToWindow()
|
160 |
|
|
{
|
161 |
|
|
super.onAttachedToWindow();
|
162 |
|
|
|
163 |
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
164 |
|
|
{
|
165 |
|
|
DisplayCutout cutout = getWindow().getDecorView().getRootWindowInsets().getDisplayCutout();
|
166 |
|
|
int insetHeight = cutout!=null ? cutout.getSafeInsetTop() : 0;
|
167 |
|
|
|
168 |
|
|
LinearLayout layoutHid = findViewById(R.id.hiddenBar);
|
169 |
|
|
ViewGroup.LayoutParams paramsHid = layoutHid.getLayoutParams();
|
170 |
|
|
paramsHid.height = (int)(insetHeight*RATIO_INSET);
|
171 |
|
|
layoutHid.setLayoutParams(paramsHid);
|
172 |
|
|
mHeightUpperBar += paramsHid.height;
|
173 |
|
|
}
|
174 |
|
|
}
|
175 |
|
|
|
176 |
9530f6b0
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
177 |
|
|
// do not avoid cutouts
|
178 |
|
|
|
179 |
|
|
private void cutoutHack()
|
180 |
|
|
{
|
181 |
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
182 |
|
|
{
|
183 |
|
|
getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
|
184 |
|
|
}
|
185 |
|
|
}
|
186 |
|
|
|
187 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
188 |
|
|
|
189 |
|
|
@Override
|
190 |
|
|
public void onWindowFocusChanged(boolean hasFocus)
|
191 |
|
|
{
|
192 |
|
|
super.onWindowFocusChanged(hasFocus);
|
193 |
|
|
|
194 |
|
|
if(mCurrentApiVersion >= Build.VERSION_CODES.KITKAT && hasFocus)
|
195 |
|
|
{
|
196 |
|
|
getWindow().getDecorView().setSystemUiVisibility(FLAGS);
|
197 |
|
|
}
|
198 |
|
|
}
|
199 |
|
|
|
200 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
201 |
|
|
|
202 |
|
|
@Override
|
203 |
|
|
protected void onPause()
|
204 |
|
|
{
|
205 |
|
|
super.onPause();
|
206 |
7ee8337b
|
leszek
|
PlayView view = findViewById(R.id.playView);
|
207 |
9530f6b0
|
Leszek Koltunski
|
view.onPause();
|
208 |
972f9eae
|
Leszek Koltunski
|
savePreferences();
|
209 |
9530f6b0
|
Leszek Koltunski
|
DistortedLibrary.onPause(ACTIVITY_NUMBER);
|
210 |
|
|
}
|
211 |
|
|
|
212 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
213 |
|
|
|
214 |
|
|
@Override
|
215 |
|
|
protected void onResume()
|
216 |
|
|
{
|
217 |
|
|
super.onResume();
|
218 |
|
|
DistortedLibrary.onResume(ACTIVITY_NUMBER);
|
219 |
7ee8337b
|
leszek
|
PlayView view = findViewById(R.id.playView);
|
220 |
e9397ae9
|
leszek
|
ObjectControl control = view.getObjectControl();
|
221 |
9530f6b0
|
Leszek Koltunski
|
view.onResume();
|
222 |
|
|
|
223 |
15ed3429
|
leszek
|
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
224 |
|
|
restorePreferences(preferences);
|
225 |
9530f6b0
|
Leszek Koltunski
|
|
226 |
7bb30586
|
leszek
|
ScreenList sl = mJustStarted ?
|
227 |
|
|
(mModeFree ? ScreenList.FREE : ScreenList.SCRA) :
|
228 |
|
|
ScreenList.getCurrentScreen();
|
229 |
|
|
|
230 |
|
|
ScreenList.switchScreen(this,sl);
|
231 |
|
|
|
232 |
88d8ccb6
|
leszek
|
if( !mJustStarted ) restoreMoves(preferences);
|
233 |
e9397ae9
|
leszek
|
|
234 |
88b94310
|
Leszek Koltunski
|
if( mObjectName.length()>0 )
|
235 |
9530f6b0
|
Leszek Koltunski
|
{
|
236 |
e9397ae9
|
leszek
|
changeIfDifferent(mObjectName,mObjectLocal,mObjectOrdinal,control);
|
237 |
9530f6b0
|
Leszek Koltunski
|
}
|
238 |
18b0ae9c
|
leszek
|
|
239 |
88d8ccb6
|
leszek
|
if( mJustStarted && !mModeFree )
|
240 |
18b0ae9c
|
leszek
|
{
|
241 |
|
|
control.scrambleObject(mNumScrambles);
|
242 |
|
|
}
|
243 |
88d8ccb6
|
leszek
|
|
244 |
|
|
mJustStarted = false;
|
245 |
9530f6b0
|
Leszek Koltunski
|
}
|
246 |
|
|
|
247 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
248 |
|
|
|
249 |
|
|
@Override
|
250 |
|
|
protected void onDestroy()
|
251 |
|
|
{
|
252 |
|
|
super.onDestroy();
|
253 |
|
|
DistortedLibrary.onDestroy(ACTIVITY_NUMBER);
|
254 |
|
|
}
|
255 |
|
|
|
256 |
972f9eae
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
257 |
|
|
|
258 |
|
|
private void savePreferences()
|
259 |
|
|
{
|
260 |
|
|
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
261 |
|
|
SharedPreferences.Editor editor = preferences.edit();
|
262 |
15ed3429
|
leszek
|
|
263 |
|
|
for( int i=0; i<ScreenList.LENGTH; i++ )
|
264 |
|
|
{
|
265 |
|
|
ScreenList.getScreen(i).getScreenClass().savePreferences(editor);
|
266 |
|
|
}
|
267 |
|
|
|
268 |
|
|
ScreenList.savePreferences(editor);
|
269 |
|
|
|
270 |
|
|
ScreenList curr = ScreenList.getCurrentScreen();
|
271 |
|
|
|
272 |
|
|
if( curr==ScreenList.FREE )
|
273 |
|
|
{
|
274 |
|
|
ScreenFree free = (ScreenFree) ScreenList.FREE.getScreenClass();
|
275 |
|
|
free.saveMovePreferences(KEY_FREE,editor);
|
276 |
|
|
}
|
277 |
|
|
if( curr==ScreenList.SOLV )
|
278 |
|
|
{
|
279 |
|
|
ScreenSolving solv = (ScreenSolving) ScreenList.SOLV.getScreenClass();
|
280 |
|
|
solv.saveMovePreferences(KEY_SOLV,editor);
|
281 |
|
|
}
|
282 |
972f9eae
|
Leszek Koltunski
|
|
283 |
953f5ac9
|
leszek
|
PlayView view = findViewById(R.id.playView);
|
284 |
|
|
OSInterface os = view.getInterface();
|
285 |
|
|
os.setEditor(editor);
|
286 |
|
|
view.getObjectControl().savePreferences();
|
287 |
|
|
|
288 |
972f9eae
|
Leszek Koltunski
|
editor.apply();
|
289 |
|
|
}
|
290 |
|
|
|
291 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
292 |
|
|
|
293 |
15ed3429
|
leszek
|
private void restorePreferences(SharedPreferences preferences)
|
294 |
972f9eae
|
Leszek Koltunski
|
{
|
295 |
15ed3429
|
leszek
|
for( int i=0; i<ScreenList.LENGTH; i++)
|
296 |
|
|
{
|
297 |
|
|
ScreenList.getScreen(i).getScreenClass().restorePreferences(preferences);
|
298 |
|
|
}
|
299 |
|
|
|
300 |
e9397ae9
|
leszek
|
if( !mJustStarted ) ScreenList.restorePreferences(preferences);
|
301 |
953f5ac9
|
leszek
|
|
302 |
|
|
PlayView view = findViewById(R.id.playView);
|
303 |
|
|
OSInterface os = view.getInterface();
|
304 |
|
|
os.setPreferences(preferences);
|
305 |
|
|
view.getObjectControl().restorePreferences();
|
306 |
15ed3429
|
leszek
|
}
|
307 |
|
|
|
308 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
309 |
|
|
|
310 |
|
|
private void restoreMoves(SharedPreferences preferences)
|
311 |
|
|
{
|
312 |
|
|
ScreenList curr = ScreenList.getCurrentScreen();
|
313 |
|
|
|
314 |
|
|
if( curr==ScreenList.FREE )
|
315 |
|
|
{
|
316 |
|
|
ScreenFree free = (ScreenFree) ScreenList.FREE.getScreenClass();
|
317 |
|
|
free.restoreMovePreferences(this,KEY_FREE,preferences);
|
318 |
|
|
}
|
319 |
|
|
if( curr==ScreenList.SOLV )
|
320 |
|
|
{
|
321 |
|
|
ScreenSolving solv = (ScreenSolving) ScreenList.SOLV.getScreenClass();
|
322 |
|
|
solv.restoreMovePreferences(this,KEY_SOLV,preferences);
|
323 |
|
|
}
|
324 |
972f9eae
|
Leszek Koltunski
|
}
|
325 |
|
|
|
326 |
9530f6b0
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
327 |
|
|
|
328 |
|
|
void OpenGLError()
|
329 |
|
|
{
|
330 |
|
|
RubikDialogError errDiag = new RubikDialogError();
|
331 |
|
|
errDiag.show(getSupportFragmentManager(), null);
|
332 |
|
|
}
|
333 |
|
|
|
334 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
335 |
|
|
|
336 |
5a2a7682
|
leszek
|
private void changeIfDifferent(String name, boolean local, int ordinal, ObjectControl control)
|
337 |
9530f6b0
|
Leszek Koltunski
|
{
|
338 |
7ee8337b
|
leszek
|
if( local )
|
339 |
|
|
{
|
340 |
|
|
RubikFiles files = RubikFiles.getInstance();
|
341 |
|
|
int iconMode = TwistyObject.MODE_NORM;
|
342 |
5a2a7682
|
leszek
|
InputStream jsonStream = files.openFile(this, name+"_object.json");
|
343 |
7ee8337b
|
leszek
|
InitAssets asset = new InitAssets(jsonStream, null, null);
|
344 |
5a2a7682
|
leszek
|
control.changeIfDifferent(ordinal,name,iconMode,asset);
|
345 |
7ee8337b
|
leszek
|
}
|
346 |
|
|
else
|
347 |
|
|
{
|
348 |
|
|
RubikObject object = RubikObjectList.getObject(ordinal);
|
349 |
|
|
int iconMode = TwistyObject.MODE_NORM;
|
350 |
|
|
InputStream jsonStream = object==null ? null : object.getObjectStream(this);
|
351 |
|
|
InputStream meshStream = object==null ? null : object.getMeshStream(this);
|
352 |
|
|
PlayView view = findViewById(R.id.playView);
|
353 |
|
|
OSInterface os = view.getInterface();
|
354 |
|
|
InitAssets asset = new InitAssets(jsonStream, meshStream, os);
|
355 |
5a2a7682
|
leszek
|
control.changeIfDifferent(ordinal, name, iconMode, asset);
|
356 |
7ee8337b
|
leszek
|
}
|
357 |
9530f6b0
|
Leszek Koltunski
|
}
|
358 |
|
|
|
359 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
360 |
|
|
// PUBLIC API
|
361 |
18b0ae9c
|
leszek
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
362 |
|
|
|
363 |
|
|
public FirebaseAnalytics getAnalytics()
|
364 |
|
|
{
|
365 |
|
|
return mFirebaseAnalytics;
|
366 |
|
|
}
|
367 |
|
|
|
368 |
9530f6b0
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
369 |
|
|
|
370 |
|
|
public int getScreenWidthInPixels()
|
371 |
|
|
{
|
372 |
|
|
return mScreenWidth;
|
373 |
|
|
}
|
374 |
|
|
|
375 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
376 |
|
|
|
377 |
|
|
public int getScreenHeightInPixels()
|
378 |
|
|
{
|
379 |
|
|
return mScreenHeight;
|
380 |
|
|
}
|
381 |
|
|
|
382 |
7ee8337b
|
leszek
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
383 |
|
|
|
384 |
|
|
public int getNumScrambles()
|
385 |
|
|
{
|
386 |
|
|
return mNumScrambles;
|
387 |
|
|
}
|
388 |
|
|
|
389 |
7bb30586
|
leszek
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
390 |
|
|
|
391 |
|
|
public int getLevel()
|
392 |
|
|
{
|
393 |
|
|
return mLevel;
|
394 |
|
|
}
|
395 |
|
|
|
396 |
c02235d5
|
leszek
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
397 |
|
|
|
398 |
|
|
public int getObjectOrdinal()
|
399 |
|
|
{
|
400 |
|
|
return mObjectOrdinal;
|
401 |
|
|
}
|
402 |
|
|
|
403 |
9530f6b0
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
404 |
|
|
|
405 |
|
|
public ObjectControl getControl()
|
406 |
|
|
{
|
407 |
7ee8337b
|
leszek
|
PlayView view = findViewById(R.id.playView);
|
408 |
9530f6b0
|
Leszek Koltunski
|
return view.getObjectControl();
|
409 |
|
|
}
|
410 |
|
|
}
|