replacing min/max usage with kotlin's

This commit is contained in:
minjaesong
2023-07-11 01:54:46 +09:00
parent d96b7d1b84
commit 79f19120f2
66 changed files with 308 additions and 345 deletions

View File

@@ -46,12 +46,12 @@ open class ParticleBase(renderOrder: Actor.RenderOrder, val despawnUponCollision
if (velocity.isZero ||
// simple stuck check
BlockCodex[(INGAME.world).getTileFromTerrain(
hitbox.centeredX.div(TerrarumAppConfiguration.TILE_SIZE).floorInt(),
hitbox.startY.div(TerrarumAppConfiguration.TILE_SIZE).floorInt()
hitbox.centeredX.div(TerrarumAppConfiguration.TILE_SIZE).floorToInt(),
hitbox.startY.div(TerrarumAppConfiguration.TILE_SIZE).floorToInt()
)].isSolid ||
BlockCodex[(INGAME.world).getTileFromTerrain(
hitbox.centeredX.div(TerrarumAppConfiguration.TILE_SIZE).floorInt(),
hitbox.endY.div(TerrarumAppConfiguration.TILE_SIZE).floorInt()
hitbox.centeredX.div(TerrarumAppConfiguration.TILE_SIZE).floorToInt(),
hitbox.endY.div(TerrarumAppConfiguration.TILE_SIZE).floorToInt()
)].isSolid) {