當前位置: 首頁>>代碼示例>>Java>>正文


Java AutumnMessage類代碼示例

本文整理匯總了Java中com.github.czyzby.autumn.mvc.config.AutumnMessage的典型用法代碼示例。如果您正苦於以下問題:Java AutumnMessage類的具體用法?Java AutumnMessage怎麽用?Java AutumnMessage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AutumnMessage類屬於com.github.czyzby.autumn.mvc.config包,在下文中一共展示了AutumnMessage類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: injectFields

import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
/** Invoked when all skins are loaded. Injects skin assets.
 *
 * @param interfaceService used to retrieve skins.
 * @return {@link OnMessage#REMOVE}. */
@SuppressWarnings("unchecked")
@OnMessage(AutumnMessage.SKINS_LOADED)
public boolean injectFields(final InterfaceService interfaceService) {
    for (final Entry<Pair<String, String>, Array<Pair<Field, Object>>> entry : fieldsToInject) {
        final Skin skin = interfaceService.getParser().getData().getSkin(entry.key.getSecond());
        final String assetId = entry.key.getFirst();
        if (skin == null) {
            throw new ContextInitiationException(
                    "Unable to inject asset: " + assetId + ". Unknown skin ID: " + entry.key.getSecond());
        }
        for (final Pair<Field, Object> injection : entry.value) {
            try {
                Reflection.setFieldValue(injection.getFirst(), injection.getSecond(),
                        skin.get(assetId, injection.getFirst().getType()));
            } catch (final ReflectionException exception) {
                throw new GdxRuntimeException("Unable to inject skin asset: " + assetId + " from skin: " + skin
                        + " to field: " + injection.getFirst() + " of component: " + injection.getSecond(),
                        exception);
            }
        }
    }
    fieldsToInject.clear();
    return OnMessage.REMOVE;
}
 
開發者ID:gdx-libs,項目名稱:gdx-autumn-mvc,代碼行數:29,代碼來源:SkinAssetAnnotationProcessor.java

示例2: initiateSkin

import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
@Initiate(priority = AutumnActionPriority.TOP_PRIORITY)
private void initiateSkin(final SkinAssetAnnotationProcessor skinAssetProcessor,
        final SkinAnnotationProcessor skinProcessor, final AssetService assetService,
        final MessageDispatcher messageDispatcher) {
    final ObjectMap<String, SkinData> skinsData = skinProcessor.getSkinsData();
    for (final Entry<String, SkinData> skinData : skinsData) {
        final Skin skin = initiateSkin(skinAssetProcessor, skinData.value, assetService, messageDispatcher);
        skins.add(skin);
        interfaceService.getParser().getData().addSkin(skinData.key, skin);
    }
    messageDispatcher.postMessage(AutumnMessage.SKINS_LOADED);
}
 
開發者ID:gdx-libs,項目名稱:gdx-autumn-mvc,代碼行數:13,代碼來源:SkinService.java

示例3: resize

import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
/** Resizes the current view, if present.
 *
 * @param width new width of the screen.
 * @param height new height of the screen. */
public void resize(final int width, final int height) {
    if (currentController != null) {
        currentController.resize(width, height);
    }
    messageDispatcher.postMessage(AutumnMessage.GAME_RESIZED);
}
 
開發者ID:gdx-libs,項目名稱:gdx-autumn-mvc,代碼行數:11,代碼來源:InterfaceService.java

示例4: pause

import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
/** Pauses the current view, if present. */
public void pause() {
    if (currentController != null) {
        currentController.pause();
    }
    messageDispatcher.postMessage(AutumnMessage.GAME_PAUSED);
}
 
開發者ID:gdx-libs,項目名稱:gdx-autumn-mvc,代碼行數:8,代碼來源:InterfaceService.java

示例5: resume

import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
/** Resumes the current view, if present. */
public void resume() {
    if (currentController != null) {
        currentController.resume();
    }
    messageDispatcher.postMessage(AutumnMessage.GAME_RESUMED);
}
 
開發者ID:gdx-libs,項目名稱:gdx-autumn-mvc,代碼行數:8,代碼來源:InterfaceService.java

示例6: assignBackground

import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
@OnMessage(AutumnMessage.ASSETS_LOADED)
public boolean assignBackground() {
    background = new TextureRegion(backgroundTexture, 0, 0, 700, 700);
    return OnMessage.REMOVE;
}
 
開發者ID:BialJam,項目名稱:M-M,代碼行數:6,代碼來源:MenuController.java

示例7: doOnLoadingFinish

import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
private void doOnLoadingFinish() {
    injectRequestedAssets();
    invokeOnLoadActions();
    messageDispatcher.postMessage(AutumnMessage.ASSETS_LOADED);
}
 
開發者ID:gdx-libs,項目名稱:gdx-autumn-mvc,代碼行數:6,代碼來源:AssetService.java


注:本文中的com.github.czyzby.autumn.mvc.config.AutumnMessage類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。