本文整理匯總了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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例7: doOnLoadingFinish
import com.github.czyzby.autumn.mvc.config.AutumnMessage; //導入依賴的package包/類
private void doOnLoadingFinish() {
injectRequestedAssets();
invokeOnLoadActions();
messageDispatcher.postMessage(AutumnMessage.ASSETS_LOADED);
}