LibGDX:其他图书馆不起作用?

时间:2016-06-21 03:07:21

标签: java libgdx kotlin fastutil

我正在为我的游戏使用LibGDX,我正在尝试使用FastUtil Int2BooleanArrayMap存储我的关键状态(上/下)。

不幸的是我得到了这个奇怪的错误:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: it.unimi.dsi.fastutil.ints.Int2BooleanArrayMap.put(IZ)Ljava/lang/Boolean;
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:131)
Caused by: java.lang.NoSuchMethodError: it.unimi.dsi.fastutil.ints.Int2BooleanArrayMap.put(IZ)Ljava/lang/Boolean;
    at com.acelta.Input.keyDown(Input.kt:12)
    at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:312)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:215)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:124)

我的输入处理器的代码非常简单:

package org.jire.wot

import com.badlogic.gdx.InputAdapter
import it.unimi.dsi.fastutil.ints.Int2BooleanArrayMap
import org.jire.wot.App.camera

object Input : InputAdapter() {

    private val map = Int2BooleanArrayMap()

    override fun keyDown(keycode: Int): Boolean {
        map.put(keycode, true)
        return true
    }

    override fun keyUp(keycode: Int): Boolean {
        map.put(keycode, false)
        return true
    }

    override fun scrolled(amount: Int): Boolean {
        camera.zoom += amount / 13F
        if (camera.zoom < 0.6F) camera.zoom = 0.6F
        else if (camera.zoom > 1F) camera.zoom = 1F
        return true
    }

}

我该怎么办?

0 个答案:

没有答案