Search in sources :

Example 1 with FreeBitmapFont

use of var3d.net.center.freefont.FreeBitmapFont in project var3dframe by Var3D.

the class VGame method create.

public void create() {
    // 数据存储实例化
    save = Gdx.app.getPreferences(getProjectName());
    // 劫持系统返回键
    Gdx.input.setCatchBackKey(true);
    // 触控实例化
    multiplexer = new InputMultiplexer();
    // 
    Gdx.input.setInputProcessor(multiplexer);
    stageTop = new StageTop(this);
    stageTop.setOff();
    isMusic = save.getBoolean("isMusic", true);
    isSound = save.getBoolean("isSound", true);
    // 全球化字体方案
    if (bundle == null)
        bundle = new VBundle(var3dListener);
    // 创建一个默认动态文本
    FreeBitmapFont font = new FreeBitmapFont(this, new FreePaint(getDefaultFontSize()));
    font.appendText("01234567890LoadingC" + getHeap());
    fonts.put("font", font);
    setStageLoad(StageLoad.class);
    init();
    var3dListener.create();
}
Also used : InputMultiplexer(com.badlogic.gdx.InputMultiplexer) FreePaint(var3d.net.center.freefont.FreePaint) FreeBitmapFont(var3d.net.center.freefont.FreeBitmapFont)

Example 2 with FreeBitmapFont

use of var3d.net.center.freefont.FreeBitmapFont in project var3dframe by Var3D.

the class Game method init.

@Override
public void init() {
    // openAutoScreenshots(5,StageTest.class);//开启自动截图
    // 不设置这一句无法使用R.strings.xxxxx的形式使用多语言,但可以使用其他在assets里的资源
    setResources(R.class);
    // openProtect("image");//加密image文件夹资源
    // unProtect("image");
    // showFps();//显示fps
    setFont("test", new FreeBitmapFont(this, new FreePaint(R.font.DroidSans)));
    // 设置入口界面
    setStage(StageTest.class);
}
Also used : FreePaint(var3d.net.center.freefont.FreePaint) FreeBitmapFont(var3d.net.center.freefont.FreeBitmapFont)

Aggregations

FreeBitmapFont (var3d.net.center.freefont.FreeBitmapFont)2 FreePaint (var3d.net.center.freefont.FreePaint)2 InputMultiplexer (com.badlogic.gdx.InputMultiplexer)1