Browse Source

added current engine

Nicolas Cannasse 13 years ago
parent
commit
deea72a737
1 changed files with 12 additions and 0 deletions
  1. 12 0
      h3d/Engine.hx

+ 12 - 0
h3d/Engine.hx

@@ -40,6 +40,18 @@ class Engine {
 		var stage = flash.Lib.current.stage;
 		s3d = stage.stage3Ds[stageIndex];
 		camera = new Camera();
+		if( CURRENT == null )
+			CURRENT = this;
+	}
+	
+	static var CURRENT : Engine = null;
+	
+	public static function getCurrent() {
+		return CURRENT;
+	}
+	
+	public function setCurrent() {
+		CURRENT = this;
 	}
 
 	public function show( b ) {