<bdo id='pL6Np'></bdo><ul id='pL6Np'></ul>

      <small id='pL6Np'></small><noframes id='pL6Np'>

    1. <i id='pL6Np'><tr id='pL6Np'><dt id='pL6Np'><q id='pL6Np'><span id='pL6Np'><b id='pL6Np'><form id='pL6Np'><ins id='pL6Np'></ins><ul id='pL6Np'></ul><sub id='pL6Np'></sub></form><legend id='pL6Np'></legend><bdo id='pL6Np'><pre id='pL6Np'><center id='pL6Np'></center></pre></bdo></b><th id='pL6Np'></th></span></q></dt></tr></i><div id='pL6Np'><tfoot id='pL6Np'></tfoot><dl id='pL6Np'><fieldset id='pL6Np'></fieldset></dl></div>

        <tfoot id='pL6Np'></tfoot>

      1. <legend id='pL6Np'><style id='pL6Np'><dir id='pL6Np'><q id='pL6Np'></q></dir></style></legend>

        Java LibGDX BitmapFont setScale 方法不起作用

        时间:2023-05-18
          <tbody id='5pGJ4'></tbody>
      2. <legend id='5pGJ4'><style id='5pGJ4'><dir id='5pGJ4'><q id='5pGJ4'></q></dir></style></legend>

        <small id='5pGJ4'></small><noframes id='5pGJ4'>

          <bdo id='5pGJ4'></bdo><ul id='5pGJ4'></ul>

            <i id='5pGJ4'><tr id='5pGJ4'><dt id='5pGJ4'><q id='5pGJ4'><span id='5pGJ4'><b id='5pGJ4'><form id='5pGJ4'><ins id='5pGJ4'></ins><ul id='5pGJ4'></ul><sub id='5pGJ4'></sub></form><legend id='5pGJ4'></legend><bdo id='5pGJ4'><pre id='5pGJ4'><center id='5pGJ4'></center></pre></bdo></b><th id='5pGJ4'></th></span></q></dt></tr></i><div id='5pGJ4'><tfoot id='5pGJ4'></tfoot><dl id='5pGJ4'><fieldset id='5pGJ4'></fieldset></dl></div>
                  <tfoot id='5pGJ4'></tfoot>
                1. 本文介绍了Java LibGDX BitmapFont setScale 方法不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我目前正在尝试缩放字体,但收到错误消息方法 setScale(float, float) 未定义 BitmapFont 类型"这是我收到错误的代码部分,特别是在第 2 行和第 4 行.

                  I am currently trying to scale a font but I am receiving the error "the method setScale(float, float) is undefined for the type BitmapFont" This is the code section where I am getting the error, specifically in lines 2 and 4.

                      font = new BitmapFont(Gdx.files.internal("text.fnt"));
                      font.setScale (.25f, -.25f);
                      shadow = new BitmapFont(Gdx.files.internal("shadow.fnt"));
                      shadow.setScale (.25f -.25f);
                  

                  我在这里创建了变量

                    public static  BitmapFont font;
                  public  static BitmapFont shadow;
                  

                  当我检查使用 setScale 函数的其他示例时,这似乎是使用的格式.关于为什么会发生这种情况的任何想法?

                  When I check other examples of using the setScale function, this seems to be the format used. Any ideas as to why this is occurring?

                  推荐答案

                  这个方法在 BitmapFont 类.

                  LibGDX 1.5.6(发布于2015 年 4 月),如 libgdx 团队博客文章中所述.您遵循的教程现在可能已经过时了.

                  An API change for the Bitmap* classes has been introduced with LibGDX 1.5.6 (released in April 2015) as explained in this libgdx team blog post. The tutorial you followed is probably now outdated.

                  长话短说,使用最新的 libgdx 版本,您应该可以做到:

                  Long story short, with the latest libgdx version, you should be able to do :

                  font.getData().setScale(.25f,.25f);
                  

                  这篇关于Java LibGDX BitmapFont setScale 方法不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:LIBGDX 创建主菜单 下一篇:在 LibGDX 中缩放位图字体

                  相关文章

                  最新文章

                    <bdo id='HshdV'></bdo><ul id='HshdV'></ul>
                    1. <small id='HshdV'></small><noframes id='HshdV'>

                    2. <tfoot id='HshdV'></tfoot>

                      <legend id='HshdV'><style id='HshdV'><dir id='HshdV'><q id='HshdV'></q></dir></style></legend>
                      <i id='HshdV'><tr id='HshdV'><dt id='HshdV'><q id='HshdV'><span id='HshdV'><b id='HshdV'><form id='HshdV'><ins id='HshdV'></ins><ul id='HshdV'></ul><sub id='HshdV'></sub></form><legend id='HshdV'></legend><bdo id='HshdV'><pre id='HshdV'><center id='HshdV'></center></pre></bdo></b><th id='HshdV'></th></span></q></dt></tr></i><div id='HshdV'><tfoot id='HshdV'></tfoot><dl id='HshdV'><fieldset id='HshdV'></fieldset></dl></div>