mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-20 15:34:05 +09:00
Keyboard strobing moved to a new thread so that fast typing is possible even if the game's update method is running slowly
This commit is contained in:
@@ -8,6 +8,7 @@ import net.torvald.terrarum.gameactors.Actor
|
||||
import net.torvald.terrarum.gameactors.ActorID
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody
|
||||
import net.torvald.terrarum.gameactors.BlockMarkerActor
|
||||
import net.torvald.terrarum.gamecontroller.TerrarumKeyboardEvent
|
||||
import net.torvald.terrarum.gameitem.ItemID
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.modulebasegame.IngameRenderer
|
||||
@@ -31,7 +32,7 @@ import java.util.concurrent.locks.Lock
|
||||
* Although the game (as product) can have infinitely many stages/planets/etc., those stages must be manually managed by YOU;
|
||||
* this instance only stores the stage that is currently being used.
|
||||
*/
|
||||
open class IngameInstance(val batch: SpriteBatch, val isMultiplayer: Boolean = false) : Screen {
|
||||
open class IngameInstance(val batch: SpriteBatch, val isMultiplayer: Boolean = false) : TerrarumGamescreen {
|
||||
|
||||
open protected val actorMBRConverter = object : MBRConverter<ActorWithBody> {
|
||||
override fun getDimensions(): Int = 2
|
||||
@@ -134,6 +135,9 @@ open class IngameInstance(val batch: SpriteBatch, val isMultiplayer: Boolean = f
|
||||
override fun hide() {
|
||||
}
|
||||
|
||||
override fun inputStrobed(e: TerrarumKeyboardEvent) {
|
||||
}
|
||||
|
||||
override fun show() {
|
||||
// the very basic show() implementation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user