Example #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();
 }
Example #2
0
  @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();
  }