use of playn.tests.core.TestsGame in project playn by threerings.
the class TestsGameHtml method start.
@Override
public void start() {
HtmlPlatform.Config config = new HtmlPlatform.Config();
try {
config.scaleFactor = Float.parseFloat(Window.Location.getParameter("scale"));
}// oh well
catch (Exception e) {
}
HtmlPlatform platform = HtmlPlatform.register(config);
platform.setTitle("Tests");
platform.assets().setPathPrefix("testsgame/");
HtmlPlatform.disableRightClickContextMenu();
PlayN.run(new TestsGame());
}
use of playn.tests.core.TestsGame in project playn by threerings.
the class TestsGameRoboVM method didFinishLaunching.
@Override
public boolean didFinishLaunching(UIApplication app, UIApplicationLaunchOptions launchOpts) {
// create a full-screen window
CGRect bounds = UIScreen.getMainScreen().getBounds();
UIWindow window = new UIWindow(bounds);
// configure and register the PlayN platform; start our game
RoboPlatform.Config config = new RoboPlatform.Config();
config.orients = UIInterfaceOrientationMask.All;
RoboPlatform pf = RoboPlatform.register(window, config);
pf.run(new TestsGame());
// make our main window visible
window.makeKeyAndVisible();
addStrongRef(window);
return true;
}
use of playn.tests.core.TestsGame in project playn by threerings.
the class TestsGameJava method main.
public static void main(String[] args) {
SWTPlatform.Config config = new SWTPlatform.Config();
if (args.length > 0) {
config.scaleFactor = Float.parseFloat(args[0]);
}
config.width = 800;
config.height = 600;
SWTPlatform platform = SWTPlatform.register(config);
platform.setTitle("Tests");
// plug in a lwjgl implementation for fullscreen test
setHost(new LWJGLFullscreen());
run(new TestsGame());
}
Aggregations