Loop
This commit is contained in:
parent
aa06c55dd7
commit
a069067c9c
@ -1,22 +1,22 @@
|
|||||||
package configuration;
|
package configuration;
|
||||||
|
|
||||||
import java.io.*;
|
//import java.io.*;
|
||||||
import org.json.simple.JSONObject;
|
//import org.json.simple.JSONObject;
|
||||||
import org.json.simple.parser.JSONParser;
|
//import org.json.simple.parser.JSONParser;
|
||||||
import org.json.simple.parser.ParseException;
|
//import org.json.simple.parser.ParseException;
|
||||||
public class JsonToJava {
|
//public class JsonToJava {
|
||||||
public static void main(String args[]) {
|
// public static void main(String args[]) {
|
||||||
JSONParser jsonP = new JSONParser();
|
// JSONParser jsonP = new JSONParser();
|
||||||
try {
|
// try {
|
||||||
JSONObject jsonO = (JSONObject)jsonP.parse(new FileReader("src/configuration/config.json"));
|
// JSONObject jsonO = (JSONObject)jsonP.parse(new FileReader("src/configuration/config.json"));
|
||||||
String test = (String) jsonO.get("test");
|
// String test = (String) jsonO.get("test");
|
||||||
System.out.println("Name :"+ test);
|
// System.out.println("Name :"+ test);
|
||||||
} catch (FileNotFoundException e) {
|
// } catch (FileNotFoundException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
} catch (IOException e) {
|
// } catch (IOException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
} catch (ParseException e) {
|
// } catch (ParseException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
@ -175,7 +175,7 @@ public class Engine {
|
|||||||
soundManager.setListener(soundListener);
|
soundManager.setListener(soundListener);
|
||||||
|
|
||||||
SoundBuffer jumpSoundBuffer = new SoundBuffer("sound/jump.ogg");
|
SoundBuffer jumpSoundBuffer = new SoundBuffer("sound/jump.ogg");
|
||||||
SoundSource soundSource = new SoundSource(true, false);
|
SoundSource soundSource = new SoundSource(false, false);
|
||||||
soundSource.setBuffer(jumpSoundBuffer.getBufferId());
|
soundSource.setBuffer(jumpSoundBuffer.getBufferId());
|
||||||
|
|
||||||
soundManager.addSoundSource("jump", soundSource);
|
soundManager.addSoundSource("jump", soundSource);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user