package com.quexten.ravtech.desktop;

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import com.badlogic.gdx.graphics.Color;
import com.quexten.ravtech.Hook;
import com.quexten.ravtech.HookApi;
import com.quexten.ravtech.RavTech;
import com.quexten.ravtech.Scene;
import com.quexten.ravtech.components.Camera;
import com.quexten.ravtech.components.GameObject;
import com.quexten.ravtech.components.SpriteRenderer;
import com.quexten.ravtech.files.SceneLoader;

public class DesktopLauncher {
	public static void main (String[] arg) {		
		final Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
		config.setWindowedMode(1280, 720);
		config.setDecorated(true);
		config.useVsync(true);		
		config.setTitle("Test");
		DesktopEngineConfiguration engineConfiguration = new DesktopEngineConfiguration();
		
		final RavTech ravtech = new RavTech(engineConfiguration);
		
		engineConfiguration.remoteEdit = false;
		
		HookApi.addHook("onBoot", new Hook() {
 		  @Override
 		  public void run() {
 			  RavTech.files.loadAsset("map.scene", Scene.class);
 			  RavTech.files.finishLoading();
 			  RavTech.currentScene = RavTech.files.getAsset("map.scene", Scene.class);
 		  }
 	  });
		HookApi.addHook("onUpdate", new Hook() {
			int i = 0;
			@Override
			public void run() {
				i++;
				GameObject.find("Camera").transform.setLocalPosition(0, (float)(Math.sin(i * 0.01) * 5));
			}
		});
		
		new Lwjgl3Application(ravtech, config);
	}
}

@@ -1276,223 +1276,330 @@
 %0A %09%09
-  %7D%0A %09  %7D);%0A%09%09HookApi.addHook(%22onUpdate%22, new Hook(
+%09  for(int x = 0; x %3C 200; x++
 ) %7B%0A
+ 
 %09%09%09
+%09  for(
 int 
-i
+y
  = 0;
-%0A%09%09%09@Override%0A%09%09%09public void run() %7B%0A%09%09%09%09i++;%0A%09%09%09%09GameObject.find(%22Camera%22).transform.setLocalPosition(0, (float)(Math.sin(i * 0.01) * 5));%0A%09%09%09%7D%0A%09%09
+ y %3C 200; y++) %7B%0A %09%09%09%09%09  GameObject object = RavTech.currentScene.addGameObject(7, 0);%0A%09%09 %09%09%09  SpriteRenderer renderer = new SpriteRenderer();%0A%09%09 %09%09%09  renderer.setTexture(%22textures/error.png%22);%0A%09%09 %09%09%09  object.addComponent(renderer);%0A %09%09%09%09  %7D%0A %09%09%09  %7D %09%09%09  %0A %09%09  %7D%0A %09  
 %7D);%0A

Add benchmark