jumping up to the platform working

This commit is contained in:
Minjae Song
2018-12-30 20:02:24 +09:00
parent 35c0c45500
commit 48de42d98b

View File

@@ -964,16 +964,13 @@ open class ActorWBMovable(renderOrder: RenderOrder, val immobileBody: Boolean =
*
* Very straightforward for the actual solid tiles, not so much for the platforms
*/
private fun shouldICollideWithThis(tile: Int): Boolean {
private fun shouldICollideWithThis(tile: Int) =
// regular solid block
return if (BlockCodex[tile].isSolid)
return true
(BlockCodex[tile].isSolid) ||
// platforms and their necessary conditionals
else if (BlockCodex[tile].isPlatform)
return true
(BlockCodex[tile].isPlatform && externalForce.y + (controllerMoveDelta?.y ?: 0.0) >= 0.0)
else return false
}
private fun getContactingAreaFluid(side: Int, translateX: Int = 0, translateY: Int = 0): Int {
if (world == null) return 0