void Awake() { _instance = this; _countId = 0; _www = null; _excute = FageConnectionManager.Instance.IsOnline(); _queue = new Queue(); }
void Awake() { _instance = this; _countId = 0; _www = null; _excute = FageConnectionManager.Instance.IsOnline(); _queue = new Queue (); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageWebLoader loader = FageWebLoader.Instance; loader.AddEventListener(FageEvent.COMPLETE, OnResponse); loader.AddEventListener(FageWebEvent.PROGRESS, OnProgress); _hash = new Hashtable(); foreach (FageBundle bundle in FageBundleRoot.Instance.bundles) { #if UNITY_EDITOR _hash.Add(loader.Request(bundle.ios, bundle.version), bundle); #elif UNITY_IOS _hash.Add(loader.Request(bundle.ios, bundle.version), bundle); #elif UNITY_ANDROID _hash.Add(loader.Request(bundle.android, bundle.version), bundle); #endif } _total = (float)_hash.Count; stateMachine.DispatchEvent(new FageBundleEvent(FageBundleEvent.DOWNLOADING)); }