我试图编写这段代码,但它显示错误,说它找不到 TextBounds。但是当我只使用 BitmapFont 时它工作得很好。
package com.gamefromscratch;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
public class TextDemo extends ApplicationAdapter
{
SpriteBatch batch;
BitmapFont font;
BitmapFont.TextBounds bounds;
String mytext;
}
我正在使用 Netbeans 8.2