【问题标题】:How to make the simplest <div>-like transparent container/layer in AndEngine?如何在 AndEngine 中制作最简单的类似 <div> 的透明容器/层?
【发布时间】:2013-07-30 23:17:26
【问题描述】:

我只想拥有一个 EntityRectangle 或可以用作其他 Sprites 的普通容器的东西。

定位目的是我需要它的目的...我需要能够设置此容器的宽度位置

我尝试过使用 Rectangle,但它似乎完全隐藏了它后面的所有内容(Z-index 较低)。

【问题讨论】:

    标签: android positioning containers andengine transparent


    【解决方案1】:

    您可以更改 Rectangle 的 alpha 以“查看”它下面的内容。类似的东西

    myRect = new Rectangle(x, (CAMERA_HEIGHT - 480 + 100) / 2, size, size, vboManager);
    
    myRect.setAlpha(0);
    
    scene.attachChild(myRect);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-22
      • 1970-01-01
      • 2015-11-17
      • 1970-01-01
      • 1970-01-01
      • 2012-06-12
      • 1970-01-01
      • 2019-01-29
      相关资源
      最近更新 更多