Preloader: use ObjectMap instead of Map with bytesLoadedCache so that Dynamic can be a key when disable_preloader_assets flag is set
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package lime.utils;
|
package lime.utils;
|
||||||
|
|
||||||
|
import haxe.ds.ObjectMap;
|
||||||
import haxe.io.Bytes;
|
import haxe.io.Bytes;
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.macro.Compiler;
|
import haxe.macro.Compiler;
|
||||||
@@ -35,7 +36,7 @@ class Preloader #if flash extends Sprite #end
|
|||||||
public var onProgress = new Event<Int->Int->Void>();
|
public var onProgress = new Event<Int->Int->Void>();
|
||||||
|
|
||||||
@:noCompletion private var bytesLoaded:Int;
|
@:noCompletion private var bytesLoaded:Int;
|
||||||
@:noCompletion private var bytesLoadedCache = new Map<#if !disable_preloader_assets AssetLibrary #else Dynamic #end, Int>();
|
@:noCompletion private var bytesLoadedCache = new ObjectMap<#if !disable_preloader_assets AssetLibrary #else Dynamic #end, Int>();
|
||||||
@:noCompletion private var bytesLoadedCache2 = new Map<String, Int>();
|
@:noCompletion private var bytesLoadedCache2 = new Map<String, Int>();
|
||||||
@:noCompletion private var bytesTotal:Int;
|
@:noCompletion private var bytesTotal:Int;
|
||||||
@:noCompletion private var bytesTotalCache = new Map<String, Int>();
|
@:noCompletion private var bytesTotalCache = new Map<String, Int>();
|
||||||
|
|||||||
Reference in New Issue
Block a user