mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 06:24:06 +09:00
dunno why but setting camera position to negative works...
This commit is contained in:
@@ -14,7 +14,7 @@ class Hitbox(x1: Double, y1: Double, width: Double, height: Double) {
|
||||
|
||||
@Volatile var hitboxStart: Point2d
|
||||
private set
|
||||
val hitboxEnd: Point2d
|
||||
inline val hitboxEnd: Point2d
|
||||
get() = Point2d(hitboxStart.x + width, hitboxStart.y + height)
|
||||
var width: Double = 0.0
|
||||
private set
|
||||
@@ -135,4 +135,8 @@ class Hitbox(x1: Double, y1: Double, width: Double, height: Double) {
|
||||
operator fun minus(other: Hitbox): Vector2 {
|
||||
return Vector2(other.centeredX - this.centeredX, other.centeredY - this.centeredY)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return this.hitboxStart == (other as Hitbox).hitboxStart && this.hitboxEnd == (other as Hitbox).hitboxEnd
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user