vanishing particle test

This commit is contained in:
minjaesong
2021-08-17 15:31:00 +09:00
parent 74ae35e9a9
commit 42c09640d0
10 changed files with 121 additions and 15 deletions

View File

@@ -103,6 +103,9 @@ class Hitbox (x1: Double, y1: Double, width: Double, height: Double, var suppres
fun setPositionX(x: Double) = setPosition(x, startY)
fun setPositionY(y: Double) = setPosition(startX, y)
/**
* Set position from bottom-centre point
*/
fun setPositionFromPointed(x1: Double, y1: Double): Hitbox {
hitboxStart = Point2d(x1 - width / 2, y1 - height)
return this