Explorar o código

jme3-examples: privatize protected/public fields

Stephen Gold %!s(int64=4) %!d(string=hai) anos
pai
achega
ecff65edb3

+ 14 - 14
jme3-examples/src/main/java/jme3test/batching/TestBatchNodeCluster.java

@@ -72,21 +72,21 @@ public class TestBatchNodeCluster extends SimpleApplication {
             }
         }
     };
-    protected Random rand = new Random();
-    protected int maxCubes = 2000;
-    protected int startAt = 0;
-    protected static int xPositions = 0, yPositions = 0, zPositions = 0;
-    protected int returner = 0;
-    protected ArrayList<Integer> xPosition = new ArrayList<Integer>();
-    protected ArrayList<Integer> yPosition = new ArrayList<Integer>();
-    protected ArrayList<Integer> zPosition = new ArrayList<Integer>();
-    protected int xLimitf = 60, xLimits = -60, yLimitf = 60, yLimits = -20, zLimitf = 60, zLimits = -60;
-    protected int circ = 8;//increases by 8 every time.
-    protected int dynamic = 4;
-    protected static AppSettings settingst;
-    protected boolean isTrue = true;
+    private Random rand = new Random();
+    private int maxCubes = 2000;
+    private int startAt = 0;
+    private static int xPositions = 0, yPositions = 0, zPositions = 0;
+    private int returner = 0;
+    private ArrayList<Integer> xPosition = new ArrayList<Integer>();
+    private ArrayList<Integer> yPosition = new ArrayList<Integer>();
+    private ArrayList<Integer> zPosition = new ArrayList<Integer>();
+    private int xLimitf = 60, xLimits = -60, yLimitf = 60, yLimits = -20, zLimitf = 60, zLimits = -60;
+    private int circ = 8;//increases by 8 every time.
+    private int dynamic = 4;
+    private static AppSettings settingst;
+    private boolean isTrue = true;
     private int lineLength = 50;
-    protected BatchNode batchNode;
+    private BatchNode batchNode;
     private Material mat1;
     private Material mat2;
     private Material mat3;

+ 1 - 1
jme3-examples/src/main/java/jme3test/bullet/TestHoveringTank.java

@@ -76,7 +76,7 @@ public class TestHoveringTank extends SimpleApplication implements AnalogListene
     private TerrainQuad terrain;
     private Material matRock;
     private boolean wireframe = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
     private Geometry collisionMarker;

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestIssue1120.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2019 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -68,7 +68,7 @@ public class TestIssue1120 extends SimpleApplication {
     private static TestIssue1120 test;
     private BulletAppState bulletAppState;
     private final boolean physicsDebug = true;
-    protected BitmapFont font;
+    private BitmapFont font;
     private final BitmapText[] testInfo = new BitmapText[2];
     private BitmapText speedText;
     private final List<Spatial> testObjects = new ArrayList<>();

+ 1 - 1
jme3-examples/src/main/java/jme3test/helloworld/HelloInput.java

@@ -52,7 +52,7 @@ public class HelloInput extends SimpleApplication {
     HelloInput app = new HelloInput();
     app.start();
   }
-  protected Geometry player;
+  private Geometry player;
   private Boolean isRunning=true;
 
   @Override

+ 2 - 2
jme3-examples/src/main/java/jme3test/helloworld/HelloLoop.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@ public class HelloLoop extends SimpleApplication {
         app.start();
     }
 
-    protected Geometry player;
+    private Geometry player;
 
     @Override
     public void simpleInitApp() {

+ 2 - 2
jme3-examples/src/main/java/jme3test/input/TestControls.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@ public class TestControls extends SimpleApplication {
             System.out.println(name + " = " + pressed);
         }
     };
-    public AnalogListener analogListener = new AnalogListener() {
+    private AnalogListener analogListener = new AnalogListener() {
         @Override
         public void onAnalog(String name, float value, float tpf) {
             System.out.println(name + " = " + value);

+ 1 - 1
jme3-examples/src/main/java/jme3test/light/TestSpotLightTerrain.java

@@ -67,7 +67,7 @@ public class TestSpotLightTerrain extends SimpleApplication {
     private boolean triPlanar = false;
     private boolean wardiso = false;
     private boolean minnaert = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
     private float grassScale = 64;

+ 4 - 4
jme3-examples/src/main/java/jme3test/renderer/TestAlphaToCoverage.java

@@ -25,12 +25,12 @@ public class TestAlphaToCoverage extends SimpleApplication {
         new TestAlphaToCoverage().start();
     }
 
-    public GL gl = new LwjglGL();
-    public GLExt glext = new LwjglGLExt();
-    public GLFbo glfbo = new LwjglGLFboEXT();
+    private GL gl = new LwjglGL();
+    private GLExt glext = new LwjglGLExt();
+    private GLFbo glfbo = new LwjglGLFboEXT();
     private GLRenderer glRenderer= new GLRenderer(gl,glext,glfbo);
 
-    public EnumSet<Caps> caps = glRenderer.getCaps();
+    private EnumSet<Caps> caps = glRenderer.getCaps();
 
 
 

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTest.java

@@ -77,7 +77,7 @@ public class TerrainTest extends SimpleApplication {
     private Material matWire;
     private boolean wireframe = false;
     private boolean triPlanar = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
     private float grassScale = 64;

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTestAdvanced.java

@@ -70,7 +70,7 @@ public class TerrainTestAdvanced extends SimpleApplication {
     private boolean triPlanar = false;
     private boolean wardiso = false;
     private boolean minnaert = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
     private float dirtScale = 16;

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTestAndroid.java

@@ -65,7 +65,7 @@ public class TerrainTestAndroid extends SimpleApplication {
     private Material matWire;
     private boolean wireframe = false;
     private boolean triPlanar = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
     private float grassScale = 64;

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTestCollision.java

@@ -83,7 +83,7 @@ public class TerrainTestCollision extends SimpleApplication {
     private Material matRock;
     private Material matWire;
     private boolean wireframe = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private PointLight pl;
     private Geometry lightMdl;
     private List<Geometry> collisionMarkers;

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTestModifyHeight.java

@@ -85,7 +85,7 @@ public class TerrainTestModifyHeight extends SimpleApplication {
     private boolean triPlanar = false;
     private boolean wardiso = false;
     private boolean minnaert = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private float grassScale = 64;
     private float dirtScale = 16;
     private float rockScale = 128;

+ 2 - 2
jme3-examples/src/main/java/jme3test/terrain/TerrainTestReadWrite.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2021 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -65,7 +65,7 @@ import java.util.logging.Logger;
 public class TerrainTestReadWrite extends SimpleApplication {
 
     private Terrain terrain;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private float grassScale = 64;
     private float dirtScale = 16;
     private float rockScale = 128;

+ 1 - 1
jme3-examples/src/main/java/jme3test/terrain/TerrainTestTile.java

@@ -72,7 +72,7 @@ public class TerrainTestTile extends SimpleApplication {
     private boolean triPlanar = false;
     private boolean wardiso = false;
     private boolean minnaert = false;
-    protected BitmapText hintText;
+    private BitmapText hintText;
     private float grassScale = 256;