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


Java MusicService类代码示例

本文整理汇总了Java中com.github.czyzby.autumn.mvc.component.sfx.MusicService的典型用法代码示例。如果您正苦于以下问题:Java MusicService类的具体用法?Java MusicService怎么用?Java MusicService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MusicService类属于com.github.czyzby.autumn.mvc.component.sfx包,在下文中一共展示了MusicService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addDefaultComponents

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
/** Invoked before context initiation.
 *
 * @param initializer should be used to registered default components, created with plain old Java. */
protected void addDefaultComponents(final ContextInitializer initializer) {
    initializer.addComponents(
            // PROCESSORS.
            // Assets:
            new AssetService(), new SkinAssetAnnotationProcessor(),
            // Locale:
            new LocaleService(),
            // SFX:
            new MusicEnabledAnnotationProcessor(), new MusicVolumeAnnotationProcessor(),
            new SoundEnabledAnnotationProcessor(), new SoundVolumeAnnotationProcessor(),
            // Settings:
            new I18nBundleAnnotationProcessor(), new PreferenceAnnotationProcessor(), new SkinAnnotationProcessor(),
            new StageViewportAnnotationProcessor(), new PreferencesService(),
            // Interface:
            new ViewAnnotationProcessor(), new ViewDialogAnnotationProcessor(),
            new ViewActionContainerAnnotationProcessor(), new ViewStageAnnotationProcessor(),
            new LmlMacroAnnotationProcessor(), new LmlParserSyntaxAnnotationProcessor(),
            new AvailableLocalesAnnotationProcessor(),
            // COMPONENTS.
            // SFX:
            new MusicService(),
            // Interface:
            interfaceService, new SkinService());
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:28,代码来源:AutumnApplication.java

示例2: getDefaultViewShowingActionProvider

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
private ActionProvider getDefaultViewShowingActionProvider() {
    return new ActionProvider() {
        @Override
        public Action provideAction(final ViewController forController, final ViewController previousController) {
            if (musicService.getCurrentTheme() == null && GdxArrays.isNotEmpty(forController.getThemes())) {
                final Music currentTheme = forController.getThemes().random();
                return Actions.sequence(Actions.alpha(0f), Actions.fadeIn(DEFAULT_FADING_TIME),
                        Actions.run(CommonActionRunnables.getMusicThemeSetterRunnable(musicService, currentTheme)),
                        Actions.run(CommonActionRunnables.getInputSetterRunnable(forController.getStage())),
                        MusicFadingAction.fadeIn(currentTheme, MusicService.DEFAULT_THEME_FADING_TIME,
                                musicService.getMusicVolume()));
            }
            return Actions.sequence(Actions.alpha(0f), Actions.fadeIn(DEFAULT_FADING_TIME),
                    Actions.run(CommonActionRunnables.getInputSetterRunnable(forController.getStage())));
        }
    };
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:18,代码来源:InterfaceService.java

示例3: act

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
@Override
public boolean act(final float delta) {
    music.setVolume(MusicService.normalizeVolume(music.getVolume() + totalVolumeDifference * delta / time));
    if (gettingLouder) {
        if (music.getVolume() >= targetValue) {
            music.setVolume(targetValue);
            return true;
        }
    } else if (music.getVolume() <= targetValue) {
        music.setVolume(targetValue);
        return true;
    }
    return false;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:15,代码来源:MusicFadingAction.java

示例4: getMusicThemeClearerRunnable

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
/** @param musicService contains current theme.
 * @return will clear current theme on invocation. */
public static Runnable getMusicThemeClearerRunnable(final MusicService musicService) {
    return CLEAR_THEME_RUNNABLE.setMusicService(musicService);
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:6,代码来源:CommonActionRunnables.java

示例5: getMusicThemeSetterRunnable

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
/** @param musicService will contain theme.
 * @param themeToSet will be set as current theme.
 * @return will set current theme on invocation. */
public static Runnable getMusicThemeSetterRunnable(final MusicService musicService, final Music themeToSet) {
    return SET_THEME_RUNNABLE.setData(musicService, themeToSet);
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:7,代码来源:CommonActionRunnables.java

示例6: setMusicService

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public CurrentThemeClearerRunnable setMusicService(final MusicService musicService) {
    this.musicService = musicService;
    return this;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:5,代码来源:CommonActionRunnables.java

示例7: setData

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public CurrentThemeSetterRunnable setData(final MusicService musicService, final Music currentTheme) {
    this.musicService = musicService;
    this.currentTheme = currentTheme;
    return this;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:6,代码来源:CommonActionRunnables.java

示例8: MusicVolumeChangeAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public MusicVolumeChangeAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:MusicVolumeChangeAction.java

示例9: CurrentSoundStateAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public CurrentSoundStateAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:CurrentSoundStateAction.java

示例10: CurrentMusicStateAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public CurrentMusicStateAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:CurrentMusicStateAction.java

示例11: ToggleSoundAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public ToggleSoundAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:ToggleSoundAction.java

示例12: CurrentSoundVolumeAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public CurrentSoundVolumeAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:CurrentSoundVolumeAction.java

示例13: ToggleMusicAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public ToggleMusicAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:ToggleMusicAction.java

示例14: CurrentMusicVolumeAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public CurrentMusicVolumeAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:CurrentMusicVolumeAction.java

示例15: SoundVolumeChangeAction

import com.github.czyzby.autumn.mvc.component.sfx.MusicService; //导入依赖的package包/类
public SoundVolumeChangeAction(final MusicService musicService) {
    this.musicService = musicService;
}
 
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:4,代码来源:SoundVolumeChangeAction.java


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