TilePropCodex is now object, torch flicker (WIP as all the torches are in unison)

Former-commit-id: df9c0e3a9ace2ba976da5e81f1f2d2217db541a0
Former-commit-id: 81a25a938023f318937e1f4ded15e6047fdf8864
This commit is contained in:
Song Minjae
2016-06-17 01:39:55 +09:00
parent 9f42ae9639
commit c4ad69525b
20 changed files with 347 additions and 206 deletions

View File

@@ -546,13 +546,17 @@ open class ActorWithBody constructor() : Actor(), Visible {
if (!isNoCollideWorld){
val delta: Vector2 = Vector2(hitbox.toVector() - nextHitbox.toVector()) // we need to traverse back, so may as well negate at the first place
val ccdDelta = delta.setMagnitude(CCD_TICK)
val ccdTryMax = 400
var ccdCount = 0
//if (ccdDelta.x.abs() >= SLEEP_THRE || ccdDelta.y.abs() >= SLEEP_THRE) { // regular situation
// CCD to delta while still colliding
while (isColliding(CONTACT_AREA_LEFT) || isColliding(CONTACT_AREA_RIGHT)
|| isColliding(CONTACT_AREA_TOP) || isColliding(CONTACT_AREA_BOTTOM)
while ((isColliding(CONTACT_AREA_LEFT) || isColliding(CONTACT_AREA_RIGHT)
|| isColliding(CONTACT_AREA_TOP) || isColliding(CONTACT_AREA_BOTTOM))
&& ccdCount < ccdTryMax
) {
nextHitbox.translate(ccdDelta)
ccdCount += 1
}
//}
/*else { // stuck while standing still

View File

@@ -33,9 +33,9 @@ object FactionCodex {
}
private fun insertionSortLastElem(arr: ArrayList<Faction>) {
var x: Faction
val x: Faction
var j: Int
var index: Int = arr.size - 1
val index: Int = arr.size - 1
x = arr[index]
j = index - 1
while (j > 0 && arr[j] > x) {