本文整理汇总了Java中playn.java.JavaPlatform类的典型用法代码示例。如果您正苦于以下问题:Java JavaPlatform类的具体用法?Java JavaPlatform怎么用?Java JavaPlatform使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JavaPlatform类属于playn.java包,在下文中一共展示了JavaPlatform类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: registerFont
import playn.java.JavaPlatform; //导入依赖的package包/类
private static void registerFont(JavaPlatform plat) {
try {
Font font = plat.assets().getFont("fonts/Lato-Regular.ttf");
plat.graphics().registerFont("Lato-Regular", font);
} catch (Exception e) {
plat.log().error("Failed to load font", e);
}
}
开发者ID:social-startup-game,项目名称:social-startup-game,代码行数:9,代码来源:SimGameJava.java
示例2: main
import playn.java.JavaPlatform; //导入依赖的package包/类
public static void main (String[] args)
{
JavaPlatform.Config config = new JavaPlatform.Config();
config.width = 1280;
config.height = 1024;
JavaPlatform.register(config);
JavaPlatform platform = new JavaPlatform(config);
platform.setPropagateEvents(true);
platform.setTitle("Flumpview");
PlayN.setPlatform(platform);
PlayN.run(new FlumpView());
}
开发者ID:deadmoose,项目名称:flumptools,代码行数:15,代码来源:FlumpView.java
示例3: run
import playn.java.JavaPlatform; //导入依赖的package包/类
public final void run ()
{
JavaPlatform.Config config = new JavaPlatform.Config();
config.headless = true;
JavaPlatform.register(config);
JavaPlatform platform = new JavaPlatform(config) {
@Override
public void invokeLater (Runnable runnable) {
// Just do it NOW
runnable.run();
}
@Override
public JavaAssets assets () {
return _assets;
}
protected JavaAssets _assets = new FileAssets(this);
};
PlayN.setPlatform(platform);
try {
execute();
} catch (IllegalArgumentException e) {
System.err.println(e.getMessage());
System.exit(-1);
}
}
开发者ID:deadmoose,项目名称:flumptools,代码行数:30,代码来源:PlayNTool.java
示例4: main
import playn.java.JavaPlatform; //导入依赖的package包/类
public static void main (String[] args) {
JavaPlatform.Config config = new JavaPlatform.Config();
config.width = 1024;
config.height = 768;
JavaPlatform pf = JavaPlatform.register(config);
pf.setTitle("PlayN Performance Tests");
PlayN.run(new PerfTest());
}
开发者ID:playn,项目名称:playn-perf,代码行数:9,代码来源:PerfTestJava.java
示例5: initializePlatform
import playn.java.JavaPlatform; //导入依赖的package包/类
@BeforeClass public static void initializePlatform() {
JavaPlatform.Config config = new JavaPlatform.Config();
plat = new JavaPlatform.Headless(config);
}
开发者ID:playn,项目名称:playn,代码行数:5,代码来源:AbstractPlayNTest.java
示例6: makeLWJGLConfig
import playn.java.JavaPlatform; //导入依赖的package包/类
private static JavaPlatform.Config makeLWJGLConfig() {
LWJGLPlatform.Config config = new LWJGLPlatform.Config();
config.width = size.width();
config.height = size.height();
return config;
}
开发者ID:social-startup-game,项目名称:social-startup-game,代码行数:7,代码来源:SimGameJava.java
示例7: givenAHeadlessPlatformWithALogCollector
import playn.java.JavaPlatform; //导入依赖的package包/类
private void givenAHeadlessPlatformWithALogCollector() {
collector = mock(Log.Collector.class);
plat = new JavaPlatform.Headless(new JavaPlatform.Headless.Config());
plat.log().setCollector(collector);
}
开发者ID:social-startup-game,项目名称:social-startup-game,代码行数:6,代码来源:LogCollectorTest.java
示例8: main
import playn.java.JavaPlatform; //导入依赖的package包/类
public static void main(String[] args) {
JavaPlatform.Config config = new JavaPlatform.Config();
// use config to customize the Java platform, if needed
JavaPlatform.register(config);
PlayN.run(new TutorialApp());
}
开发者ID:donkirkby,项目名称:playn-ui-tutorial,代码行数:7,代码来源:TutorialAppJava.java
示例9: FileAssets
import playn.java.JavaPlatform; //导入依赖的package包/类
public FileAssets (JavaPlatform platform)
{
super(platform);
setPathPrefix("");
}
开发者ID:deadmoose,项目名称:flumptools,代码行数:6,代码来源:FileAssets.java
注:本文中的playn.java.JavaPlatform类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论