more renaming things

Former-commit-id: 80e29fc17e431e350d8d4860273ec42bc4ad67df
Former-commit-id: d70546a097d66ade94de93b4be157b7c9637e98f
This commit is contained in:
Song Minjae
2017-01-29 20:48:55 +09:00
parent c60a967050
commit 172e5752ca
5 changed files with 27 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ abstract class Actor(val renderOrder: ActorOrder) : Comparable<Actor>, Runnable
*/
fun generateUniqueReferenceID(): Int {
fun checkForCollision(value: Int) =
Terrarum.ingame.hasActor(value) ||
Terrarum.ingame.theGameHasActor(value) ||
value < ItemCodex.ITEM_COUNT_MAX ||
value < when (renderOrder) {
ActorOrder.BEHIND -> ItemCodex.ITEM_COUNT_MAX

View File

@@ -65,7 +65,7 @@ open class ActorWithSprite(renderOrder: ActorOrder, val immobileBody: Boolean =
)
/**
* TODO external force? do we need this? we have moveDelta
* Elevators/Movingwalks/etc.: edit hitbox manually!
*
* Velocity vector for newtonian sim.
* Acceleration: used in code like:
@@ -506,9 +506,12 @@ open class ActorWithSprite(renderOrder: ActorOrder, val immobileBody: Boolean =
}
}
// axis X
if (isTouchingSide(nextHitbox, COLLIDING_LEFT) || isTouchingSide(nextHitbox, COLLIDING_RIGHT)
&& moveDelta.x != 0.0) { // check right and left
if (isTouchingSide(nextHitbox, COLLIDING_LEFT) || isTouchingSide(nextHitbox, COLLIDING_RIGHT)) { // check right and left
// the actor is hitting the wall
// FIXME balls are stuck in this
if (referenceID != 321321321)
println("$this trying to reflectX")
hitAndReflectX()
}
}