<tfoot id='Y6Pwj'></tfoot>

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

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

      • <bdo id='Y6Pwj'></bdo><ul id='Y6Pwj'></ul>

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

        LibGdx 2 半屏“按钮"

        时间:2023-05-20
        <i id='GHxo2'><tr id='GHxo2'><dt id='GHxo2'><q id='GHxo2'><span id='GHxo2'><b id='GHxo2'><form id='GHxo2'><ins id='GHxo2'></ins><ul id='GHxo2'></ul><sub id='GHxo2'></sub></form><legend id='GHxo2'></legend><bdo id='GHxo2'><pre id='GHxo2'><center id='GHxo2'></center></pre></bdo></b><th id='GHxo2'></th></span></q></dt></tr></i><div id='GHxo2'><tfoot id='GHxo2'></tfoot><dl id='GHxo2'><fieldset id='GHxo2'></fieldset></dl></div>
          <tbody id='GHxo2'></tbody>

              <bdo id='GHxo2'></bdo><ul id='GHxo2'></ul>
              <tfoot id='GHxo2'></tfoot>

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

              <legend id='GHxo2'><style id='GHxo2'><dir id='GHxo2'><q id='GHxo2'></q></dir></style></legend>

                  本文介绍了LibGdx 2 半屏“按钮"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  (Android)所以我是 LibGdx 的新手,我正在尝试编写这个 chrome dino 迷你游戏.我想在用户触摸屏幕左侧时执行操作 1,并在用户触摸屏幕左侧时执行操作 2触摸屏幕右侧,怎么办?

                  (Android) So I'm new to LibGdx and I'm trying to code this chrome dino mini game.. I want to make action 1 when the user touch the left hand side of the screen and make action 2 when he touch the right hand side of the screen, how can I do it?

                  推荐答案

                  您可以通过在游戏循环中的某处使用以下代码来检测被触摸的一侧:

                  You can detect the side being touched by using the following code somewhere inside your game loop:

                  if (Gdx.input.isTouched()) {
                      if (Gdx.input.getX() > Gdx.graphics.getWidth() / 2){
                          //touched right
                      } else {
                          //touchde left
                      }
                  }
                  

                  这篇关于LibGdx 2 半屏“按钮"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:libgdx 剪切图像 下一篇:Android/Java - GoogleMaps FragmentActivity 上的自定义视图

                  相关文章

                  最新文章

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

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

                    <tfoot id='hIiI1'></tfoot>
                  2. <small id='hIiI1'></small><noframes id='hIiI1'>

                    <legend id='hIiI1'><style id='hIiI1'><dir id='hIiI1'><q id='hIiI1'></q></dir></style></legend>