Project

General

Profile

« Previous | Next » 

Revision c65a5efe

Added by Leszek Koltunski about 3 years ago

Further simplifications.

View differences:

src/main/java/org/distorted/helpers/MovesController.java
26 26
import android.widget.ImageButton;
27 27
import android.widget.LinearLayout;
28 28

  
29
import org.distorted.objectlib.helpers.BlockController;
30 29
import org.distorted.objectlib.helpers.MovesFinished;
31 30
import org.distorted.objectlib.main.ObjectControl;
32 31

  
......
37 36

  
38 37
public class MovesController implements MovesFinished
39 38
  {
39
  private static final int MOVES_PLACE_0 = 100;
40 40
  private static final int MILLIS_PER_DEGREE = 6;
41 41

  
42 42
  private static class Move
......
103 103
          {
104 104
          mCanPrevMove = false;
105 105
          mControl = control;
106
          mControl.blockTouch(BlockController.MOVES_PLACE_0);
106
          mControl.blockTouch(MOVES_PLACE_0);
107 107
          mControl.addRotation(this, axis, (1<<move.mRow), -angle, MILLIS_PER_DEGREE);
108 108
          }
109 109
        else
src/main/java/org/distorted/main/RubikActivity.java
45 45
import org.distorted.objectlib.main.ObjectControl;
46 46
import org.distorted.objectlib.main.TwistyObject;
47 47
import org.distorted.objectlib.main.ObjectType;
48
import org.distorted.objectlib.helpers.BlockController;
49 48
import org.distorted.objectlib.effects.BaseEffect;
50 49

  
51 50
import org.distorted.dialogs.RubikDialogError;
......
223 222
      RubikSurfaceView view = findViewById(R.id.rubikSurfaceView);
224 223
      view.onPause();
225 224
      DistortedLibrary.onPause(0);
226
      BlockController.onPause();
227 225
      RubikNetwork.onPause();
228 226
      savePreferences();
229 227
      }
......
235 233
      {
236 234
      super.onResume();
237 235
      DistortedLibrary.onResume(0);
238
      BlockController.onResume();
239 236
      RubikSurfaceView view = findViewById(R.id.rubikSurfaceView);
240 237
      view.onResume();
241 238
      restorePreferences();
src/main/java/org/distorted/main/RubikSurfaceView.java
29 29

  
30 30
import com.google.firebase.crashlytics.FirebaseCrashlytics;
31 31

  
32
import org.distorted.library.type.Static4D;
33

  
34 32
import org.distorted.objectlib.main.ObjectControl;
35 33

  
36 34
import org.distorted.screens.ScreenList;
......
118 116

  
119 117
///////////////////////////////////////////////////////////////////////////////////////////////////
120 118

  
121
    public Static4D getQuat()
119
    @Override
120
    public void onPause()
122 121
      {
123
      return mObjectController.getQuat();
122
      super.onPause();
123
      mObjectController.onPause();
124 124
      }
125 125

  
126 126
///////////////////////////////////////////////////////////////////////////////////////////////////
......
129 129
    public void onResume()
130 130
      {
131 131
      super.onResume();
132
      mObjectController.initialize();
132
      mObjectController.onResume();
133 133
      }
134 134

  
135 135
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/tutorials/TutorialActivity.java
37 37

  
38 38
import org.distorted.objectlib.main.ObjectControl;
39 39
import org.distorted.objectlib.main.ObjectType;
40
import org.distorted.objectlib.helpers.BlockController;
41 40

  
42 41
import org.distorted.main.R;
43 42
import org.distorted.dialogs.RubikDialogError;
......
190 189
      if( mWebView!=null ) mWebView.onPause();
191 190

  
192 191
      DistortedLibrary.onPause(1);
193
      BlockController.onPause();
194 192
      }
195 193

  
196 194
///////////////////////////////////////////////////////////////////////////////////////////////////
......
200 198
      {
201 199
      super.onResume();
202 200
      DistortedLibrary.onResume(1);
203
      BlockController.onResume();
204 201
      TutorialSurfaceView view = findViewById(R.id.tutorialSurfaceView);
205 202
      view.onResume();
206 203

  
src/main/java/org/distorted/tutorials/TutorialSurfaceView.java
114 114
        }
115 115
      }
116 116

  
117
///////////////////////////////////////////////////////////////////////////////////////////////////
118

  
119
    @Override
120
    public void onPause()
121
      {
122
      super.onPause();
123
      mObjectController.onPause();
124
      }
125

  
117 126
///////////////////////////////////////////////////////////////////////////////////////////////////
118 127

  
119 128
    @Override
120 129
    public void onResume()
121 130
      {
122 131
      super.onResume();
123
      mObjectController.initialize();
132
      mObjectController.onResume();
124 133
      }
125 134

  
126 135
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff