本文整理汇总了Java中com.badlogic.gdx.Gdx.app方法的典型用法代码示例。如果您正苦于以下问题:Java Gdx.app方法的具体用法?Java Gdx.app怎么用?Java Gdx.app使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.Gdx
的用法示例。
在下文中一共展示了Gdx.app方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
@Before
public void setup() {
Gdx.app = mock(Application.class);
engine = mock(PooledEngine.class);
when(engine.createComponent(HealthComponent.class)).thenReturn(new HealthComponent());
when(engine.createComponent(DamageComponent.class)).thenReturn(new DamageComponent());
ServiceLocator.appComponent = mock(AppComponent.class);
when(ServiceLocator.getAppComponent().getAudioService()).thenReturn(mock(AudioService.class));
ServiceLocator.entityComponent = mock(EntityComponent.class);
when(ServiceLocator.getEntityComponent().getEffectTextureFactory()).thenReturn(mock(EffectTextureFactory.class));
entity = mock(Entity.class);
fixture = new EffectComponent();
effect1 = Mockito.spy(BaseEffect.class);
when(effect1.tick(any(PooledEngine.class), any(Entity.class), any(EffectComponent.class), anyFloat())).thenReturn(false, false, false, true);
effect2 = Mockito.spy(BaseEffect.class);
}
示例2: setup
import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
@Before
public void setup() {
Gdx.app = mock(Application.class);
engine = mock(PooledEngine.class);
when(engine.createComponent(HealthComponent.class)).thenReturn(new HealthComponent());
when(engine.createComponent(DamageComponent.class)).thenReturn(new DamageComponent());
ServiceLocator.appComponent = mock(AppComponent.class);
when(ServiceLocator.getAppComponent().getAudioService()).thenReturn(mock(AudioService.class));
ServiceLocator.entityComponent = mock(EntityComponent.class);
when(ServiceLocator.getEntityComponent().getEffectTextureFactory()).thenReturn(mock(EffectTextureFactory.class));
entity = mock(Entity.class);
fixture = new InvulnerabilityEffect();
effectComponent = mock(EffectComponent.class);
}
示例3: init
import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
@BeforeClass
public static void init() {
// Note that we don't need to implement any of the listener's methods
Gdx.app = new HeadlessApplication(new ApplicationListener() {
@Override
public void create() {
}
@Override
public void resize(int width, int height) {
}
@Override
public void render() {
}
@Override
public void pause() {
}
@Override
public void resume() {
}
@Override
public void dispose() {
}
});
// Use Mockito to mock the OpenGL methods since we are running headlessly
Gdx.gl20 = Mockito.mock(GL20.class);
Gdx.gl = Gdx.gl20;
}
示例4: launchMainWindow
import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
private void launchMainWindow() {
// config for main window
Lwjgl3Application app = (Lwjgl3Application) Gdx.app;
Lwjgl3WindowConfiguration config = new Lwjgl3WindowConfiguration();
config.setTitle("GdxSplash");
config.setWindowIcon(Main.WINDOW_ICON);
config.setWindowedMode(1280, 720);
config.setWindowSizeLimits(1, 1, 9999, 9999);
// start main window and close this one
app.newWindow(new MainWindow(loadingTask.getTexture()), config);
window.closeWindow();
}
示例5: AndroidTextFieldDialog
import com.badlogic.gdx.Gdx; //导入方法依赖的package包/类
public AndroidTextFieldDialog() {
this.activity = (Activity)Gdx.app;
load();
}