Skip to content

Commit 0b140b1

Browse files
committed
jme3-examples: privatize methods
1 parent 77b8344 commit 0b140b1

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

jme3-examples/src/main/java/jme3test/TestChooser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public TestChooser() throws HeadlessException {
9696
* @return classes vector, list of all the classes in a given package (must
9797
* be found in classpath).
9898
*/
99-
protected Vector<Class> find(String pckgname, boolean recursive,
99+
private Vector<Class> find(String pckgname, boolean recursive,
100100
Vector<Class> classes) {
101101
URL url;
102102

jme3-examples/src/main/java/jme3test/app/TestCloneSpatial.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016 jMonkeyEngine
2+
* Copyright (c) 2016-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -117,7 +117,7 @@ public static void main( String... args ) throws Exception {
117117
/**
118118
* Debug dump to check structure and identity
119119
*/
120-
public static void dump( String indent, Spatial s ) {
120+
private static void dump( String indent, Spatial s ) {
121121
if( s instanceof Node ) {
122122
dump(indent, (Node)s);
123123
} else if( s instanceof Geometry ) {

jme3-examples/src/main/java/jme3test/collision/TestMousePick.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public void simpleUpdate(float tpf){
106106
}
107107

108108
/** A cube object for target practice */
109-
protected Geometry makeCube(String name, float x, float y, float z) {
109+
private Geometry makeCube(String name, float x, float y, float z) {
110110
Box box = new Box(1, 1, 1);
111111
Geometry cube = new Geometry(name, box);
112112
cube.setLocalTranslation(x, y, z);
@@ -117,7 +117,7 @@ protected Geometry makeCube(String name, float x, float y, float z) {
117117
}
118118

119119
/** A floor to show that the "shot" can go through several objects. */
120-
protected Geometry makeFloor() {
120+
private Geometry makeFloor() {
121121
Box box = new Box(15, .2f, 15);
122122
Geometry floor = new Geometry("the Floor", box);
123123
floor.setLocalTranslation(0, -4, -5);

jme3-examples/src/main/java/jme3test/games/WorldOfInception.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2021 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -515,7 +515,7 @@ public static Vector3f[] getPositions(int count, long seed) {
515515
* @param max
516516
* @return the mapped value
517517
*/
518-
public static float mapValue(float x, float min, float max) {
518+
private static float mapValue(float x, float min, float max) {
519519
return mapValue(x, 0, 1, min, max);
520520
}
521521

@@ -529,7 +529,7 @@ public static float mapValue(float x, float min, float max) {
529529
* @param max
530530
* @return the mapped value
531531
*/
532-
public static float mapValue(float x, float inputMin, float inputMax, float min, float max) {
532+
private static float mapValue(float x, float inputMin, float inputMax, float min, float max) {
533533
return (x - inputMin) * (max - min) / (inputMax - inputMin) + min;
534534
}
535535
}

jme3-examples/src/main/java/jme3test/helloworld/HelloPhysics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public void initWall() {
180180
}
181181

182182
/** This method creates one individual physical brick. */
183-
public void makeBrick(Vector3f loc) {
183+
private void makeBrick(Vector3f loc) {
184184
/** Create a brick geometry and attach to scene graph. */
185185
Geometry brick_geo = new Geometry("brick", box);
186186
brick_geo.setMaterial(wall_mat);

jme3-examples/src/main/java/jme3test/helloworld/HelloPicking.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void onAction(String name, boolean keyPressed, float tpf) {
125125
};
126126

127127
/** A cube object for target practice */
128-
protected Geometry makeCube(String name, float x, float y, float z) {
128+
private Geometry makeCube(String name, float x, float y, float z) {
129129
Box box = new Box(1, 1, 1);
130130
Geometry cube = new Geometry(name, box);
131131
cube.setLocalTranslation(x, y, z);
@@ -136,7 +136,7 @@ protected Geometry makeCube(String name, float x, float y, float z) {
136136
}
137137

138138
/** A floor to show that the "shot" can go through several objects. */
139-
protected Geometry makeFloor() {
139+
private Geometry makeFloor() {
140140
Box box = new Box(15, .2f, 15);
141141
Geometry floor = new Geometry("the Floor", box);
142142
floor.setLocalTranslation(0, -4, -5);
@@ -147,7 +147,7 @@ protected Geometry makeFloor() {
147147
}
148148

149149
/** A red ball that marks the last spot that was "hit" by the "shot". */
150-
protected void initMark() {
150+
private void initMark() {
151151
Sphere sphere = new Sphere(30, 30, 0.2f);
152152
mark = new Geometry("BOOM!", sphere);
153153
Material mark_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
@@ -156,7 +156,7 @@ protected void initMark() {
156156
}
157157

158158
/** A centred plus sign to help the player aim. */
159-
protected void initCrossHairs() {
159+
private void initCrossHairs() {
160160
setDisplayStatView(false);
161161
guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");
162162
BitmapText ch = new BitmapText(guiFont, false);
@@ -167,7 +167,7 @@ protected void initCrossHairs() {
167167
guiNode.attachChild(ch);
168168
}
169169

170-
protected Spatial makeCharacter() {
170+
private Spatial makeCharacter() {
171171
// load a character from jme3test-test-data
172172
Spatial golem = assetManager.loadModel("Models/Oto/Oto.mesh.xml");
173173
golem.scale(0.5f);

0 commit comments

Comments
 (0)