mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 14:04:05 +09:00
thread pooling terraingen, WIP
Former-commit-id: 1d0687d8b34d5e8192b652904a437cdb29f27b10 Former-commit-id: 1c06ce97a59eb13455cc180a4d5f13ffbead1f84
This commit is contained in:
15
src/net/torvald/terrarum/gameactors/ThreadActorUpdate.kt
Normal file
15
src/net/torvald/terrarum/gameactors/ThreadActorUpdate.kt
Normal file
@@ -0,0 +1,15 @@
|
||||
package net.torvald.terrarum.gameactors
|
||||
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import org.newdawn.slick.GameContainer
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 16-05-25.
|
||||
*/
|
||||
class ThreadActorUpdate(val startIndex: Int, val endIndex: Int,
|
||||
val gc: GameContainer, val delta: Int) : Runnable {
|
||||
override fun run() {
|
||||
for (i in startIndex..endIndex)
|
||||
Terrarum.game.actorContainer[i].update(gc, delta)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user