mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
Physics stuff Float -> Double
Former-commit-id: 54ccee75769691aa6aaa2416767bd15270f63347 Former-commit-id: 61e892434f48adf11e3ca49b60928a930fd5cde9
This commit is contained in:
@@ -287,32 +287,6 @@ constructor(gamename: String) : StateBasedGame(gamename) {
|
||||
return cfg
|
||||
}
|
||||
|
||||
/**
|
||||
* Return config from config set. If the config does not exist, default value will be returned.
|
||||
* @param key
|
||||
* *
|
||||
* @return Config from config set or default config if it does not exist.
|
||||
* *
|
||||
* @throws NullPointerException if the specified config simply does not exist.
|
||||
*/
|
||||
fun getConfigFloat(key: String): Float {
|
||||
var cfg = 0f
|
||||
try {
|
||||
cfg = gameConfig.getAsFloat(key)!!
|
||||
}
|
||||
catch (e: NullPointerException) {
|
||||
try {
|
||||
cfg = DefaultConfig.fetch().get(key).asFloat
|
||||
}
|
||||
catch (e1: NullPointerException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
/**
|
||||
* Return config from config set. If the config does not exist, default value will be returned.
|
||||
* @param key
|
||||
|
||||
Reference in New Issue
Block a user