wire connectivity wip (need to take a look at the renderer)

This commit is contained in:
minjaesong
2022-07-08 00:27:00 +09:00
parent db0be9e088
commit adc151b169
9 changed files with 102 additions and 36 deletions

View File

@@ -298,16 +298,8 @@ object Terrarum : Disposable {
else -> throw IllegalArgumentException("Invalid vector index $vector for subtile $this")
}
fun getNextTileCoord() = when (vector) {
SubtileVector.CENTRE -> x to y
SubtileVector.RIGHT -> (x + 1) to y
SubtileVector.BOTTOM -> x to (y + 1)
SubtileVector.LEFT -> (x - 1) to y
SubtileVector.TOP -> x to (y - 1)
else -> throw IllegalArgumentException("Invalid vector index $vector for subtile $this")
}
fun getCurrentTileCoord() = x to y
val currentTileCoord = x to y
val nextTileCoord = nx to ny
}
fun getMouseSubtile4(): MouseSubtile4 {