当前位置: 首页>>代码示例>>Java>>正文


Java Scene.setBackground方法代码示例

本文整理汇总了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;
}
 
开发者ID:PLNech,项目名称:BactMan-Adventures,代码行数:21,代码来源:PictoGame.java

示例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());
    }
}
 
开发者ID:PLNech,项目名称:BactMan-Adventures,代码行数:14,代码来源:GutGame.java

示例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;
}
 
开发者ID:PLNech,项目名称:BactMan-Adventures,代码行数:28,代码来源:PianoGame.java

示例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;
}
 
开发者ID:PLNech,项目名称:BactMan-Adventures,代码行数:16,代码来源:BinGame.java

示例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);
}
 
开发者ID:PLNech,项目名称:BactMan-Adventures,代码行数:7,代码来源:AbstractGameActivity.java


注:本文中的org.andengine.entity.scene.Scene.setBackground方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。