public static void LoadStringData(AssetsCompleteDelegate onComplete) { Lang lang = Service.Lang; List <string> list = new List <string>(); list.Add(string.Format("strings_{0}.json.joe", lang.DotNetLocale)); list.Add(string.Format("strings-hn_{0}.json.joe", lang.DotNetLocale)); int i = 0; int count = list.Count; while (i < count) { string assetName = list[i]; Service.AssetManager.AddJoeFileToManifest(assetName, "strings"); Service.AssetManager.RegisterPreloadableAsset(assetName); i++; } Lang arg_B4_0 = lang; List <string> arg_B4_1 = list; if (LangUtils.< > f__mg$cache0 == null) { LangUtils.< > f__mg$cache0 = new AssetSuccessDelegate(LangUtils.OnLangComplete); } AssetSuccessDelegate arg_B4_2 = LangUtils.< > f__mg$cache0; if (LangUtils.< > f__mg$cache1 == null) { LangUtils.< > f__mg$cache1 = new AssetFailureDelegate(LangUtils.OnLangFailure); } arg_B4_0.LoadAssets(arg_B4_1, arg_B4_2, LangUtils.< > f__mg$cache1, onComplete); }
public MultiAssetInfo(string assetName, AssetSuccessDelegate onSuccess, AssetFailureDelegate onFailure, object cookie, RefCount refCount, AssetsCompleteDelegate onComplete, object completeCookie) : base(AssetHandle.Invalid, assetName, onSuccess, onFailure, cookie) { this.RefCount = refCount; this.OnComplete = onComplete; this.CompleteCookie = completeCookie; }
public bool LoadCachedScreen(ref AssetHandle assetHandle, string assetName, AssetSuccessDelegate onSuccess, AssetFailureDelegate onFailure, object cookie) { if (this.cache.ContainsKey(assetName)) { assetHandle = AssetHandle.FirstUser; AssetRequest item = new AssetRequest(assetHandle, assetName, onSuccess, onFailure, cookie); this.loadQueue.Add(item); Service.Get <ViewTimeEngine>().RegisterFrameTimeObserver(this); return(true); } return(false); }
public AssetRequest(AssetHandle handle, string assetName, AssetSuccessDelegate onSuccess, AssetFailureDelegate onFailure, object cookie) { this.Handle = handle; this.AssetName = assetName; this.OnSuccess = onSuccess; this.OnFailure = onFailure; this.Cookie = cookie; this.DelayLoadFrameCount = 0; }
public void LoadAssets(List <string> assetNames, AssetSuccessDelegate onSuccess, AssetFailureDelegate onFailure, object cookie) { List <object> list = new List <object>(); int i = 0; int count = assetNames.Count; while (i < count) { this.assetHandles.Add(AssetHandle.Invalid); list.Add(null); i++; } Service.Get <AssetManager>().MultiLoad(this.assetHandles, assetNames, onSuccess, onFailure, list, (AssetsCompleteDelegate)cookie, null); }