Explorar el Código

Allow for App mark override.

clementlandrin hace 1 año
padre
commit
4c674af781
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      hxd/App.hx

+ 6 - 2
hxd/App.hx

@@ -113,7 +113,7 @@ class App implements h3d.IDrawable {
 		if( disposePrevious )
 			this.s2d.dispose();
 		this.s2d = s2d;
-		s2d.mark = function(name) s3d.mark(name);
+		s2d.mark = mark;
 	}
 
 	function setScene3D( s3d : h3d.scene.Scene, disposePrevious = true ) {
@@ -129,6 +129,10 @@ class App implements h3d.IDrawable {
 		s2d.render(e);
 	}
 
+	function mark(name : String) {
+		s3d.mark(name);
+	}
+
 	function setup() {
 		var initDone = false;
 		engine.onReady = staticHandler;
@@ -140,7 +144,7 @@ class App implements h3d.IDrawable {
 		};
 		s3d = new h3d.scene.Scene();
 		s2d = new h2d.Scene();
-		s2d.mark = function(name) s3d.mark(name);
+		s2d.mark = mark;
 		sevents = new hxd.SceneEvents();
 		sevents.addScene(s2d);
 		sevents.addScene(s3d);