Browse Source

added syncOnly

ncannasse 8 years ago
parent
commit
65e7487a44
1 changed files with 10 additions and 0 deletions
  1. 10 0
      h2d/Scene.hx

+ 10 - 0
h2d/Scene.hx

@@ -372,6 +372,16 @@ class Scene extends Layers implements h3d.IDrawable implements hxd.SceneEvents.I
 		ctx.engine.frameCount--;
 	}
 
+	public function syncOnly( et : Float ) {
+		var engine = h3d.Engine.getCurrent();
+		setElapsedTime(et);
+		ctx.engine = engine;
+		ctx.frame++;
+		ctx.time += ctx.elapsedTime;
+		ctx.globalAlpha = alpha;
+		sync(ctx);
+	}
+
 	public function render( engine : h3d.Engine ) {
 		ctx.engine = engine;
 		ctx.frame++;