本文整理汇总了Java中org.andengine.entity.scene.Scene.setBackground方法的典型用法代码示例。如果您正苦于以下问题:Java Scene.setBackground方法的具体用法?Java Scene.setBackground怎么用?Java Scene.setBackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.andengine.entity.scene.Scene
的用法示例。
在下文中一共展示了Scene.setBackground方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareScene
import org.andengine.entity.scene.Scene; //导入方法依赖的package包/类
@Override
public Scene prepareScene() {
Scene scene = activity.getScene();
final Background backgroundColor = new Background(0.84706f, 0.64706f, 0.84314f);
scene.setBackground(backgroundColor);
resetGamePoints();
createCards();
scene.setTouchAreaBindingOnActionDownEnabled(true);
TimerHandler myTimer = new TimerHandler(1, true, new ITimerCallback() {
public void onTimePassed(TimerHandler pTimerHandler) {
decrementTime();
}
});
scene.registerUpdateHandler(myTimer);
return scene;
}
示例2: createBackground
import org.andengine.entity.scene.Scene; //导入方法依赖的package包/类
private void createBackground(Scene scene) {
final SmoothCamera camera = activity.getCamera();
final VertexBufferObjectManager vbom = activity.getVBOM();
final ITiledTextureRegion texFlow = activity.getTexture(ResMan.GUT_FLOW);
final IEntity layerBG = scene.getChildByIndex(AbstractGameActivity.LAYER_BACKGROUND);
scene.setBackground(new SpriteBackground(new Sprite(0, 0, camera.getWidth(), camera.getHeight(),
activity.getTexture(ResMan.GUT_BG), vbom)));
for (int i = 0; i < 4; i++) {
layerBG.attachChild(new Flow(POS_FLOW[i], texFlow, vbom).getSprite());
}
}
示例3: prepareScene
import org.andengine.entity.scene.Scene; //导入方法依赖的package包/类
@Override
public Scene prepareScene() {
Scene scene = activity.getScene();
resetGamePoints();
final SmoothCamera camera = activity.getCamera();
final VertexBufferObjectManager vbom = activity.getVBOM();
scene.setBackground(new SpriteBackground(new Sprite(0, 0, camera.getWidth(), camera.getHeight(),
activity.getTexture(ResMan.PIANO_BG), vbom)));
Polymerase polymerase = new Polymerase(189, 35, activity);
scene.getChildByIndex(AbstractGameActivity.LAYER_FOREGROUND).attachChild(polymerase.getSprite());
createKeys();
createADN();
scene.setTouchAreaBindingOnActionDownEnabled(true);
TimerHandler myTimer = new TimerHandler(1, true, new ITimerCallback() {
public void onTimePassed(TimerHandler pTimerHandler) {
decrementTime();
}
});
scene.registerUpdateHandler(myTimer);
return scene;
}
示例4: prepareScene
import org.andengine.entity.scene.Scene; //导入方法依赖的package包/类
@Override
public Scene prepareScene() {
Scene scene = activity.getScene();
scene.setBackground(new SpriteBackground(new Sprite(0, 0, PortraitGameActivity.CAMERA_WIDTH,
PortraitGameActivity.CAMERA_HEIGHT, activity.getTexture(ResMan.BIN_BG), activity.getVBOM())));
resetGamePoints();
createCameraWalls();
createBins();
createItems();
scene.setTouchAreaBindingOnActionDownEnabled(true);
return scene;
}
示例5: initSplashScene
import org.andengine.entity.scene.Scene; //导入方法依赖的package包/类
void initSplashScene(ITextureRegion splashTexture, int width, int height) {
splashScene = new Scene();
DitheredSprite splash = new DitheredSprite(0, 0, width, height, splashTexture, getVBOM());
splashBackground = new SpriteBackground(splash);
splashScene.setBackground(splashBackground);
}