Loading item from module using Groovy

This commit is contained in:
Song Minjae
2017-04-26 23:53:22 +09:00
parent 05c9c8f5df
commit 49d3c9f55b
27 changed files with 291 additions and 67 deletions

View File

@@ -230,7 +230,8 @@ class GameWorld(val width: Int, val height: Int) {
/**
* @return true if block is broken
*/
fun inflctTerrainDamage(x: Int, y: Int, damage: Float): Boolean {
fun inflictTerrainDamage(x: Int, y: Int, damage: Double): Boolean {
val damage = damage.toFloat()
val addr = LandUtil.getTileAddr(x, y)
//println("[GameWorld] ($x, $y) Damage: $damage")
@@ -261,7 +262,8 @@ class GameWorld(val width: Int, val height: Int) {
/**
* @return true if block is broken
*/
fun inflctWallDamage(x: Int, y: Int, damage: Float): Boolean {
fun inflictWallDamage(x: Int, y: Int, damage: Double): Boolean {
val damage = damage.toFloat()
val addr = LandUtil.getTileAddr(x, y)
if (wallDamages[addr] == null) { // add new