changed how camera smoothing works but not sure it doing what I intended

This commit is contained in:
minjaesong
2021-10-15 10:34:41 +09:00
parent 51fe1028e9
commit bc009a4b8d
4 changed files with 30 additions and 16 deletions

View File

@@ -44,21 +44,27 @@ class Hitbox {
get() = hitboxStart.x
val startY: Double
get() = hitboxStart.y
val startVec: Vector2
get() = hitboxStart.toVector()
val endX: Double
get() = hitboxStart.x + width
val endY: Double
get() = hitboxStart.y + height
val endVec: Vector2
get() = hitboxEnd.toVector()
val centeredX: Double
get() = hitboxStart.x + width * 0.5
val centeredY: Double
get() = hitboxStart.y + height * 0.5
val centerVec: Vector2
get() = Vector2(centeredX, centeredY)
/**
* @return bottom-centered point of hitbox.
*/
val canonicalX: Double
inline val canonicalX: Double
get() = centeredX
/**
@@ -67,6 +73,9 @@ class Hitbox {
inline val canonicalY: Double
get() = endY
val canonVec: Vector2
get() = Vector2(canonicalX, canonicalY)
/**
* Set to the point top left
* @param x1