typewriter: faster typing sound, backspace is working again

This commit is contained in:
minjaesong
2021-11-26 16:58:54 +09:00
parent 1fce4055d7
commit 87012d7671
4 changed files with 15 additions and 10 deletions

View File

@@ -109,7 +109,7 @@ class TypewriterGDX(val width: Int, val height: Int, val cols: Int) : Game() {
var initDone = false
var initTimer = 0f
var initTypingCursor = 0
var keystrokeDelay = 0.12f
var keystrokeDelay = 0.08f
fun acceptKey(keycode: Int, force: Boolean = false) {
if (initDone || force) {
@@ -187,13 +187,13 @@ class TypewriterGDX(val width: Int, val height: Int, val cols: Int) : Game() {
initTimer -= keystrokeDelay
if (keyToType == Input.Keys.ENTER)
initTimer -= 0.4f
initTimer -= 0.35f
else if (keyToType == 0x561F71)
initTimer -= 0.2f
else if (keyToType == 0x561F70)
initTimer -= 0.15f
else if (keyToType == 0x561F70)
initTimer -= 0.1f
else
initTimer -= Math.random().toFloat() * 0.08f
initTimer -= Math.random().toFloat() * 0.04f
}
initTimer += Gdx.graphics.deltaTime