Pārlūkot izejas kodu

move cleanup from ContextShared to Context

ncannasse 7 gadi atpakaļ
vecāks
revīzija
a2f11671ed
2 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. 1 0
      hxd/prefab/Context.hx
  2. 0 2
      hxd/prefab/ContextShared.hx

+ 1 - 0
hxd/prefab/Context.hx

@@ -5,6 +5,7 @@ package hxd.prefab;
 	public var local2d : h2d.Sprite;
 	public var local3d : h3d.scene.Object;
 	public var shared : ContextShared;
+	public var cleanup : Void -> Void;
 	public var custom : Dynamic;
 	public var isRef : Bool = false;
 

+ 0 - 2
hxd/prefab/ContextShared.hx

@@ -12,7 +12,6 @@ class ContextShared {
 	public var root3d : h3d.scene.Object;
 	public var contexts : Map<Prefab,Context>;
 	public var references : Map<Prefab,Array<Context>>;
-	public var cleanups : Array<Void->Void>;
 	public var currentPath : String;
 
 	var cache : h3d.prim.ModelCache;
@@ -25,7 +24,6 @@ class ContextShared {
 		contexts = new Map();
 		references = new Map();
 		cache = new h3d.prim.ModelCache();
-		cleanups = [];
 		shaderCache = new ShaderDefCache();
 	}