Commit b7c04f9b authored by Elena Berrios's avatar Elena Berrios
Browse files

Prevent repeat activity switching

parent 8e283a33
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -167,16 +167,20 @@ public class Game extends SurfaceView implements SurfaceHolder.Callback {
        detector2.update();
        // Check for collision with detectors
        if (Circle.isColliding(player, detector1)) {
            canMove = false;
            if (canMove) {
                // call method to start quiz activity
                startSecondActivity();
            }
            Log.d("COLLISION", "DETECTOR");
            canMove = false;
        }
        if (Circle.isColliding(player, detector2)) {
            canMove = false;
            if (canMove) {
                // call method to start chalk activity
                startChalkActivity();
            }
            Log.d("COLLISION", "DETECTOR");
            canMove = false;
        }
    }