Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在环顾四周,似乎无法找到如何将场景的背景设置为渐变......很难找到与 Andengine 相关的可靠答案,
我想我的选择是:
任何帮助表示赞赏。
您的活动类(onCreateScene 或 onPopulateScene)中的以下代码应将红色/蓝色渐变设置为背景。
Gradient g = new Gradient(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT, this.getVertexBufferObjectManager()); g.setGradient(Color.RED, Color.BLUE, 1, 0); this.setBackground(new EntityBackground(g));