Search in sources :

Example 1 with TestsGame

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());
}
Also used : TestsGame(playn.tests.core.TestsGame) HtmlPlatform(playn.html.HtmlPlatform)

Example 2 with 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;
}
Also used : TestsGame(playn.tests.core.TestsGame) CGRect(org.robovm.apple.coregraphics.CGRect) RoboPlatform(playn.robovm.RoboPlatform) UIWindow(org.robovm.apple.uikit.UIWindow)

Example 3 with TestsGame

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());
}
Also used : TestsGame(playn.tests.core.TestsGame) SWTPlatform(playn.java.SWTPlatform)

Aggregations

TestsGame (playn.tests.core.TestsGame)3 CGRect (org.robovm.apple.coregraphics.CGRect)1 UIWindow (org.robovm.apple.uikit.UIWindow)1 HtmlPlatform (playn.html.HtmlPlatform)1 SWTPlatform (playn.java.SWTPlatform)1 RoboPlatform (playn.robovm.RoboPlatform)1