浏览代码

cleanup hide stuff

ncannasse 7 年之前
父节点
当前提交
c267973739
共有 1 个文件被更改,包括 0 次插入23 次删除
  1. 0 23
      hxd/prefab/ContextShared.hx

+ 0 - 23
hxd/prefab/ContextShared.hx

@@ -16,13 +16,6 @@ class ContextShared {
 	var cache : h3d.prim.ModelCache;
 	var cache : h3d.prim.ModelCache;
 	var shaderCache : ShaderDefCache;
 	var shaderCache : ShaderDefCache;
 
 
-	#if editor
-	var scene : hide.comp.Scene;
-	public function getScene() {
-		return scene;
-	}
-	#end
-
 	public function new() {
 	public function new() {
 		root2d = new h2d.Sprite();
 		root2d = new h2d.Sprite();
 		root3d = new h3d.scene.Object();
 		root3d = new h3d.scene.Object();
@@ -49,9 +42,6 @@ class ContextShared {
 	}
 	}
 
 
 	public function loadShader( path : String ) : ShaderDef {
 	public function loadShader( path : String ) : ShaderDef {
-		#if editor
-		return hide.Ide.inst.shaderLoader.loadSharedShader(path);
-		#else
 		var r = shaderCache.get(path);
 		var r = shaderCache.get(path);
 		if(r != null)
 		if(r != null)
 			return r;
 			return r;
@@ -63,31 +53,18 @@ class ContextShared {
 		};
 		};
 		shaderCache.set(path, r);
 		shaderCache.set(path, r);
 		return r;
 		return r;
-		#end
 	}
 	}
 
 
 	public function loadModel( path : String ) {
 	public function loadModel( path : String ) {
-		#if editor
-		return getScene().loadModel(path);
-		#else
 		return cache.loadModel(hxd.res.Loader.currentInstance.load(path).toModel());
 		return cache.loadModel(hxd.res.Loader.currentInstance.load(path).toModel());
-		#end
 	}
 	}
 
 
 	public function loadAnimation( path : String ) {
 	public function loadAnimation( path : String ) {
-		#if editor
-		return getScene().loadAnimation(path);
-		#else
 		return @:privateAccess cache.loadAnimation(hxd.res.Loader.currentInstance.load(path).toModel());
 		return @:privateAccess cache.loadAnimation(hxd.res.Loader.currentInstance.load(path).toModel());
-		#end
 	}
 	}
 
 
 	public function loadTexture( path : String ) {
 	public function loadTexture( path : String ) {
-		#if editor
-		return getScene().loadTexture("",path);
-		#else
 		return cache.loadTexture(null, path);
 		return cache.loadTexture(null, path);
-		#end
 	}
 	}
 
 
 }
 }