/**
   * Executes the CoreEngine through a command line. Takes the path of the configuration file as a
   * command line argument.
   *
   * @param args - path of the configuration file and command to execute (merge or mode)
   */
  public static void main(String[] args) {
    if (args.length < 2) {
      printUsage();
      return;
    }

    try {
      File configFile = new File(args[0]);
      if (!configFile.exists()) {
        throw new Exception("Configuration file does not exist - " + args[0]);
      }

      InputStream configFileFin = new FileInputStream(configFile);
      CoreEngine app = new CoreEngine(configFileFin);
      app.execute(args[1]);
    } catch (Exception e) {
      System.out.println("ERROR: Failure. Please see the stack trace below for details.");
      System.out.println();
      e.printStackTrace();
    }
  }
Beispiel #2
0
 @Override
 public void addToEngine(CoreEngine engine) {
   engine.getRenderingEngine().addCamera(this);
 }