Exemple #1
0
 @Override
 public void onModuleLoad() {
   HtmlPlatform.Config config = new HtmlPlatform.Config();
   // use config to customize the HTML platform, if needed
   HtmlPlatform plat = new HtmlPlatform(config);
   plat.assets().setPathPrefix("Reversi3/");
   new Reversi(plat);
   plat.start();
 }
  @Override
  public void start() {
    InAppPayments payments = new HtmlInAppPayments();
    InAppPaymentsFactory.buildInAppPayments(payments);

    HtmlPlatform platform = HtmlPlatform.register();
    platform.assets().setPathPrefix("paymentsdemo/");
    PlayN.run(new PaymentsDemo());
  }
 private void handleNarrativeOverride(MonsterGame.Config gameConf) {
   if (Window.Location.getParameter("override") != null) {
     String json = popupNarrativeOverride();
     try {
       gameConf.narrativeOverride = new NarrativeParser(plat.json()).parse(json);
     } catch (JsonParserException parseException) {
       popupParseException();
     }
   }
 }
  @Override
  public void onModuleLoad() {
    HtmlPlatform.Config platConf = new HtmlPlatform.Config();
    // use config to customize the HTML platform, if needed
    plat = new HtmlPlatform(platConf);
    plat.assets().setPathPrefix("monsters/");
    MonsterGame.Config gameConf = new MonsterGame.Config(plat);
    handleNarrativeOverride(gameConf);

    new HtmlTpPlatform(plat) {
      {
        TPPlatform._instance = this;
      }
    };

    MonsterGame game = new MonsterGame(gameConf);
    game.onGameStart.connect(trackGameStartEvent);
    game.onGameEnd.connect(trackGameEndEvent);

    plat.start();
  }
Exemple #5
0
 @Override
 public void start() {
   HtmlPlatform platform = HtmlPlatform.register();
   platform.assets().setPathPrefix("spring/");
   PlayN.run(new Spring());
 }