parent
8a420a013d
commit
848cf0fdb8
Binary file not shown.
@ -0,0 +1,22 @@
|
||||
package com.demo.tank.util;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
public class PropertyManager {
|
||||
static Properties property = new Properties();
|
||||
|
||||
static {
|
||||
try {
|
||||
property.load(PropertyManager.class.getClassLoader().getResourceAsStream("config"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static int getInt(String key){
|
||||
if(property == null) return 0;
|
||||
return Integer.valueOf((String)property.get(key));
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
enemy.tank.number=8
|
||||
tank.speed=5
|
||||
bullet.speed=5
|
||||
game.width=1080
|
||||
game.height=720
|
Loading…
Reference in new issue