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


Java Debug.w方法代码示例

本文整理汇总了Java中org.andengine.util.debug.Debug.w方法的典型用法代码示例。如果您正苦于以下问题:Java Debug.w方法的具体用法?Java Debug.w怎么用?Java Debug.w使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.andengine.util.debug.Debug的用法示例。


在下文中一共展示了Debug.w方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadLocaleLevels

import org.andengine.util.debug.Debug; //导入方法依赖的package包/类
private void loadLocaleLevels() {
    // Load level assets
    // TODO: Loading all level intros now is wasteful, need to hack SoundFactory to take a callback when loading finishes
    Debug.d("Loading intros");
    for (int i = 0; i < locale.levels.size(); i++) {
        Level level = locale.levels.get(i);
        Debug.d("Loading intros for level " + level.name);
        for (int j = 0; j < level.intro.size(); j++) {
            IntroPage page = level.intro.get(j);
            Debug.d("Loading level intro sound file " + page.sound);
            try {
                levelSounds.put(page.sound, MusicFactory.createMusicFromAsset(PhoeniciaContext.musicManager, PhoeniciaContext.context, page.sound));
            } catch (IOException e) {
                Debug.w("Failed to load level intro sound: "+page.sound);
                e.printStackTrace();
            }
        }
    }

}
 
开发者ID:Linguaculturalists,项目名称:Phoenicia,代码行数:21,代码来源:PhoeniciaGame.java

示例2: showGame

import org.andengine.util.debug.Debug; //导入方法依赖的package包/类
/**
 * Create a new instance of the game building HUD for the specified game
 */
public void showGame(final Level level, final GameTile tile) {
    //TODO: Show appropriate game hud
    Debug.d("Opening game of type: " + tile.game.type);
    if (tile.game.type.equals("wordmatch")) {
        this.push(new WordMatchGameHUD(this.game, level, tile));
    } else if (tile.game.type.equals("imagematch")) {
        this.push(new ImageMatchGameHUD(this.game, level, tile));
    } else if (tile.game.type.equals("numbermatch")) {
        this.push(new NumberMatchGameHUD(this.game, level, tile));
    } else {
        Debug.w("Unknown game type: " + tile.game.type);
    }
}
 
开发者ID:Linguaculturalists,项目名称:Phoenicia,代码行数:17,代码来源:HUDManager.java

示例3: SessionSprite

import org.andengine.util.debug.Debug; //导入方法依赖的package包/类
public SessionSprite(float px, float py, GameSession session, VertexBufferObjectManager vbo) {
    super(px, py, PhoeniciaGame.PERSON_TILE_WIDTH, PhoeniciaGame.PERSON_TILE_HEIGHT+32);
    Debug.d("Adding SessionSprite as "+px+","+py);
    this.session = session;
    if (session.session_name.get() == null) {
        Debug.d("Session has no name, setting it to Player " + (sessionSprites.size() + 1));
        session.session_name.set("Player "+(sessionSprites.size()+1));
        //session.session_name.set("Mchezaji"+(sessionSprites.size()+1));
        session.save(PhoeniciaContext.context);
    }
    Debug.i("Adding Game session: " + session.session_name.get() + " in " + session.locale_pack.get());
    LocaleLoader localeLoader = new LocaleLoader();
    Locale session_locale;
    try {
        session_locale = localeLoader.load(PhoeniciaContext.assetManager.open(session.locale_pack.get()));
        Person currentPerson = session_locale.person_map.get(session.person_name.get());
        if (currentPerson == null) {
            Debug.w("Game Session without person!");
            // TODO: use an "unknown user" image instead
            int person_index = sessionSprites.size() % session_locale.people.size();
            currentPerson = session_locale.people.get(person_index);
            session.person_name.set(currentPerson.name);
            session.save(PhoeniciaContext.context);
        }
        AssetBitmapTexture texture = new AssetBitmapTexture(PhoeniciaContext.textureManager, PhoeniciaContext.assetManager, currentPerson.texture_src);
        texture.load();
        ITextureRegion personRegion = TextureRegionFactory.extractFromTexture(texture, 0, 0, game.PERSON_TILE_WIDTH, game.PERSON_TILE_HEIGHT);

        block = new ButtonSprite(this.getWidth()/2, py, personRegion, PhoeniciaContext.vboManager);

        personName = new Text(block.getWidth()/2, -16, GameFonts.dialogText(), session.session_name.get(), session.session_name.get().length(),  new TextOptions(AutoWrap.WORDS, 256, HorizontalAlign.CENTER), PhoeniciaContext.vboManager);
        //block.attachChild(personName);

        Texture newShell = new AssetBitmapTexture(PhoeniciaContext.textureManager, PhoeniciaContext.assetManager, session_locale.shell_src);
        newShell.load();
        final int GU = 96;
        ITextureRegion levelRegion = TextureRegionFactory.extractFromTexture(newShell, GU*5, GU*0, GU*3, GU*1);
        final ButtonSprite levelIcon = new ButtonSprite(block.getWidth()/2, (0 - levelRegion.getHeight()/2), levelRegion, PhoeniciaContext.vboManager);
        String current_level = session.current_level.get();
        if (current_level == null) current_level = "0";
        final Text levelName = new Text(160, levelIcon.getHeight()/2, GameFonts.defaultHUDDisplay(), current_level, 4, PhoeniciaContext.vboManager);
        levelIcon.attachChild(levelName);
        block.attachChild(levelIcon);

        this.attachChild(block);

    } catch (final IOException e) {
        Debug.e("Failed to load game session person!", e);
    }

    clickDetector = new ClickDetector(this);
    holdDetector = new HoldDetector(this);
    holdDetector.setTriggerHoldMinimumMilliseconds(2000);
}
 
开发者ID:Linguaculturalists,项目名称:Phoenicia,代码行数:55,代码来源:SessionSelectionScene.java


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