lightbox fixed once again

This commit is contained in:
minjaesong
2023-10-29 02:03:47 +09:00
parent cc5b9616fe
commit 757207cf9b
3 changed files with 25 additions and 12 deletions

View File

@@ -99,9 +99,9 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
* Hitbox(x-offset, y-offset, width, height)
* (Use ArrayList for normal circumstances)
*/
@Transient override var lightBoxList: ArrayList<Lightbox> = arrayListOf(Lightbox(Hitbox(2.0, 2.0, baseHitboxW - 2.0, baseHitboxH - 2.0), Cvec(0)))
@Transient override var lightBoxList: ArrayList<Lightbox> = arrayListOf(Lightbox(Hitbox(1.0, 1.0, baseHitboxW - 2.0, baseHitboxH - 2.0), Cvec(0)))
// the actual values are update on the update()
@Transient override var shadeBoxList: ArrayList<Lightbox> = arrayListOf(Lightbox(Hitbox(2.0, 2.0, baseHitboxW - 2.0, baseHitboxH - 2.0), Cvec(0)))
@Transient override var shadeBoxList: ArrayList<Lightbox> = arrayListOf(Lightbox(Hitbox(1.0, 1.0, baseHitboxW - 2.0, baseHitboxH - 2.0), Cvec(0)))
// the actual values are update on the update()
@Transient val BASE_DENSITY = 980.0
@@ -801,4 +801,14 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
}
}
}
override fun reload() {
super.reload()
lightBoxList = arrayListOf(Lightbox(Hitbox(1.0, 1.0, baseHitboxW - 2.0, baseHitboxH - 2.0), Cvec(0)))
// the actual values are update on the update()
shadeBoxList = arrayListOf(Lightbox(Hitbox(1.0, 1.0, baseHitboxW - 2.0, baseHitboxH - 2.0), Cvec(0)))
// the actual values are update on the update()
}
}

View File

@@ -12,6 +12,7 @@ import net.torvald.terrarum.gameactors.*
import net.torvald.terrarum.gameitems.mouseInInteractableRange
import net.torvald.terrarum.langpack.Lang
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
import java.awt.Color
import java.util.*
/**