new item type, "Dynamic Item"; working text terminal

Former-commit-id: 81e6d836f5f1e6490027d38146a32d404cf9ce3e
Former-commit-id: af6557340f9cd0ea0b67eb7a8825aeffe75f9d82
This commit is contained in:
Song Minjae
2016-09-10 16:45:04 +09:00
parent 9b9b65efba
commit d8b70887a9
69 changed files with 1310 additions and 131 deletions

View File

@@ -0,0 +1,35 @@
package net.torvald.terrarum.gameworld
import net.torvald.point.Point2d
import java.io.Serializable
class MapPoint {
var startPoint: Point2d? = null
private set
var endPoint: Point2d? = null
private set
constructor() {
}
constructor(p1: Point2d, p2: Point2d) {
setPoint(p1, p2)
}
constructor(x1: Int, y1: Int, x2: Int, y2: Int) {
setPoint(x1, y1, x2, y2)
}
fun setPoint(p1: Point2d, p2: Point2d) {
startPoint = p1
endPoint = p2
}
fun setPoint(x1: Int, y1: Int, x2: Int, y2: Int) {
startPoint = Point2d(x1.toDouble(), y1.toDouble())
endPoint = Point2d(x2.toDouble(), y2.toDouble())
}
}