Пример #1
0
 void Awake()
 {
     _instance = this;
     _countId  = 0;
     _www      = null;
     _excute   = FageConnectionManager.Instance.IsOnline();
     _queue    = new Queue();
 }
Пример #2
0
 void Awake()
 {
     _instance	= this;
     _countId	= 0;
     _www		= null;
     _excute		= FageConnectionManager.Instance.IsOnline();
     _queue		= new Queue ();
 }
Пример #3
0
    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));
    }