public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); FageBundleLoader loader = stateMachine as FageBundleLoader; if (request != null) { if (request.isDone) { string name = queueAsset.Dequeue() as string; loader.GetLoadedAssets().Add(name, request.asset); request = null; } } else { if ((queueAsset == null) || (queueAsset.Count == 0)) { if (queueBundle.Count > 0) { AssetBundle ab = queueBundle.Dequeue() as AssetBundle; loader.GetLoadedBundles().Add(ab.name); } if ((queueBundle == null) || (queueBundle.Count == 0)) { loader.ReserveState("FageBundleLoaderIdle"); loader.SetUpdateTime(); loader.DispatchEvent(new FageEvent(FageEvent.COMPLETE)); } else { AssetBundle ab = queueBundle.Peek() as AssetBundle; queueAsset = new Queue(ab.GetAllAssetNames()); } } else { AssetBundle ab = queueBundle.Peek() as AssetBundle; string name = queueAsset.Peek() as string; request = ab.LoadAssetAsync(name); } } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; Queue queue = manager.GetRequests (); if (queue.Count > 0) { FageUIRequest request = queue.Peek () as FageUIRequest; switch (request.command) { case FageUIRequest.POP: ExcutePop(manager, request); break; case FageUIRequest.CHANGE: case FageUIRequest.PUSH: ExcutePush (manager, request); break; case FageUIRequest.POPUP: case FageUIRequest.POPDOWN: ExcutePopdown (manager, request); break; default: throw new UnityException ("unkown command"); } } else { throw new UnityException ("request lost"); } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageBundleLoader.Instance.AddEventListener(FageEvent.COMPLETE, OnLoadBundleComplete); FageUIManager manager = stateMachine as FageUIManager; Queue queue = manager.GetRequests (); if (queue.Count > 0) { FageUIRequest request = queue.Peek () as FageUIRequest; switch (request.command) { case FageUIRequest.CHANGE: ExcuteChange(manager, request); break; case FageUIRequest.PUSH: ExcutePush (manager, request); break; case FageUIRequest.POP: ExcutePop(manager, request); break; case FageUIRequest.POPUP: ExcutePopup(manager, request); break; case FageUIRequest.POPDOWN: ExcutePopdown (manager, request); break; default: throw new UnityException ("unkown command"); } } else { throw new UnityException ("request lost"); } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; fsm.SetAudioStatus(FageAudioStatus.PLAYING); _timeSamples = fsm.audioSource.timeSamples; }
public override void Excute (FageStateMachine stateMachine) { base.Excute (stateMachine); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; if (fsm.audioSource.isPlaying) { fsm.ReserveState("FageAudioSourcePlaying"); } }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch(stateMachine, afterId); _hash = null; FageWebLoader.Instance.RemoveEventListener(FageEvent.COMPLETE, OnResponse); FageWebLoader.Instance.RemoveEventListener(FageWebEvent.PROGRESS, OnProgress); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; fsm.SetAudioStatus(FageAudioStatus.PAUSED); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; Queue queue = manager.GetRequests(); if (queue.Count > 0) { FageUIRequest request = queue.Peek() as FageUIRequest; switch (request.command) { case FageUIRequest.POP: ExcutePop(manager, request); break; case FageUIRequest.CHANGE: case FageUIRequest.PUSH: ExcutePush(manager, request); break; case FageUIRequest.POPUP: case FageUIRequest.POPDOWN: ExcutePopdown(manager, request); break; default: throw new UnityException("unkown command"); } } else { throw new UnityException("request lost"); } }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); FageUIManager manager = stateMachine as FageUIManager; Queue queue = manager.GetRequests (); if (queue.Count > 0) { FageUIRequest request = queue.Peek() as FageUIRequest; switch(request.command) { case FageUIRequest.CHANGE: case FageUIRequest.POP: case FageUIRequest.PUSH: ExcutePush(manager, request); break; case FageUIRequest.FLUSH: ExcuteFlush(manager, request); break; case FageUIRequest.POPUP: ExcutePopup(manager, request); break; case FageUIRequest.POPDOWN: ExcutePopdown(manager, request); break; case FageUIRequest.LEVEL: ExcuteLevel(manager, request); break; default: throw new UnityException("unknown commnad"); } } }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch (stateMachine, afterId); _hash = null; FageWebLoader.Instance.RemoveEventListener (FageEvent.COMPLETE, OnResponse); FageWebLoader.Instance.RemoveEventListener (FageWebEvent.PROGRESS, OnProgress); }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch (stateMachine, afterId); _requestId = -1; FageConnectionManager.Instance.RemoveEventListener(FageEvent.SENSOR_ONLINE, OnOnline); FageConnectionManager.Instance.RemoveEventListener(FageEvent.SENSOR_OFFLINE, OnOffline); FageWebLoader.Instance.RemoveEventListener(FageEvent.COMPLETE, OnResponse); }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; if (fsm.audioSource.isPlaying) { fsm.ReserveState("FageAudioSourcePlaying"); } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; fsm.SetAudioStatus(FageAudioStatus.PLAYING); _timeSamples = fsm.audioSource.timeSamples; }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch(stateMachine, afterId); _requestId = -1; FageConnectionManager.Instance.RemoveEventListener(FageEvent.SENSOR_ONLINE, OnOnline); FageConnectionManager.Instance.RemoveEventListener(FageEvent.SENSOR_OFFLINE, OnOffline); FageWebLoader.Instance.RemoveEventListener(FageEvent.COMPLETE, OnResponse); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageConnectionManager.Instance.AddEventListener(FageEvent.SENSOR_ONLINE, OnOnline); FageConnectionManager.Instance.AddEventListener(FageEvent.SENSOR_OFFLINE, OnOffline); FageConnectionManager.Instance.AddEventListener(FageEvent.SENSOR_PING, OnPing); FageWebLoader.Instance.AddEventListener(FageEvent.COMPLETE, OnResponse); }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); FageUIManager manager = stateMachine as FageUIManager; if (current.state == FageUICommonMem.INTANTIATED) { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); } }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); if (current != null) { if (current.state == FageUICommonMem.DESTROIED) { stateMachine.ReserveState("FageUIManagerSwitch"); } } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; FageUIRequest request = manager.GetRequests().Peek() as FageUIRequest; string levelName = request.levelName; _async = FageBundleLoader.Instance.LoadLevel(levelName); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; FageUIRequest request = manager.GetRequests ().Peek () as FageUIRequest; string levelName = request.levelName; _async = FageBundleLoader.Instance.LoadLevel(levelName); }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch(stateMachine, afterId); _effector = null; _screen = null; _blur = null; _presetFrom = null; _presetTo = null; }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch(stateMachine, afterId); GalleryScreen gs = stateMachine as GalleryScreen; gs.HideTexts(); gs.HideStars(); gs.HideButtons(); }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); GalleryScreen gs = stateMachine as GalleryScreen; if (gs.IsDragging()) { gs.ReserveState("GalleryDragging"); } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); Debug.Log("GalleryLocked"); GalleryScreen gs = stateMachine as GalleryScreen; gs.ShowTexts(); gs.HideStars(); gs.ShowButtons(); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; _curtain = manager.canvas.GetComponentInChildren<IFageUICurtainComponent>(); if (_curtain == null) throw new UnityException("no interface found : IFageUICurtainComponent"); _curtain.StartOpen(OnOpenComplete); }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); CameraEffector effector = stateMachine as CameraEffector; if (effector.GetRequestCount() > 0) { effector.ReserveState("CameraEffectorTween"); } }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); if (current != null) { if (current.state == FageUICommonMem.DESTROIED) { stateMachine.ReserveState("FageUIManagerSwitch"); } } }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); switch (Application.internetReachability) { case NetworkReachability.ReachableViaCarrierDataNetwork: case NetworkReachability.ReachableViaLocalAreaNetwork: stateMachine.ReserveState("FageConnectionPing"); break; } }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); FageUIManager manager = stateMachine as FageUIManager; if (current.state == FageUICommonMem.INTANTIATED) { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); Debug.Log("GalleryScrolling"); GalleryScreen gs = stateMachine as GalleryScreen; gs.HideTexts(); gs.HideStars(); gs.HideButtons(); LeanTween.move(gs.content.transform as RectTransform, new Vector3(0f, -(gs.availables - 1) * gs.gap, 0f), 2f).setDelay(1.3f).setEase(LeanTweenType.easeInOutCubic).setOnComplete(OnTweenComplete).setOnCompleteParam(gs); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; _curtain = manager.canvas.GetComponentInChildren <IFageUICurtainComponent>(); if (_curtain == null) { throw new UnityException("no interface found : IFageUICurtainComponent"); } _curtain.StartOpen(OnOpenComplete); }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); FageUIManager manager = stateMachine as FageUIManager; if (_async != null) { if (_async.isDone) manager.ReserveState ("FageUIManagerCurtOpen"); } else { manager.GetRequests().Dequeue(); manager.ReserveState ("FageUIManagerIdle"); } }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); FageBundleLoader loader = stateMachine as FageBundleLoader; if ((loader.expireTime < (Time.unscaledTime - loader.GetUpdateTime())) || loader.flagUpdate) { loader.flagUpdate = false; loader.ReserveState("FageBundleLoaderCheck"); } else if (loader.flagLoad) { loader.ReserveState("FageBundleLoaderLoad"); } else if (loader.flagDownload) { loader.flagDownload = false; loader.ReserveState("FageBundleLoaderDownload"); } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageConnectionManager.Instance.AddEventListener(FageEvent.SENSOR_ONLINE, OnOnline); FageConnectionManager.Instance.AddEventListener(FageEvent.SENSOR_OFFLINE, OnOffline); FageConnectionManager.Instance.AddEventListener(FageEvent.SENSOR_PING, OnPing); FageWebLoader.Instance.AddEventListener(FageEvent.COMPLETE, OnResponse); // if (FageConnectionManager.Instance.IsOnline()) { // OnOnline(null); // } else { // OnOffline(null); // } }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; if (!fsm.audioSource.isPlaying) { if (fsm.audioSource.timeSamples > 0) { fsm.ReserveState("FageAudioSourcePaused"); } else { fsm.ReserveState("FageAudioSourceReady"); } } else if (_timeSamples > fsm.audioSource.timeSamples) { fsm.NotifyLoop(); } _timeSamples = fsm.audioSource.timeSamples; }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; FageUIRequest request = manager.GetRequests ().Peek () as FageUIRequest; if ((request.uiCurtain == null) || (request.levelName == null)) throw new UnityException ("parameter (FageUICurtain, levelName) is required"); GameObject go = GameObject.Instantiate (FageBundleLoader.Instance.Load (request.uiCurtain) as GameObject); go.transform.SetParent (manager.canvas, false); IFageUICurtainComponent curtain = go.GetComponent<IFageUICurtainComponent> (); if (curtain == null) throw new UnityException ("no interface found : IFageUICurtainComponent"); curtain.StartClose (OnCloseComplete); }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); if (Application.internetReachability == NetworkReachability.NotReachable) { if (_online) { stateMachine.DispatchEvent (new FageEvent (FageEvent.SENSOR_OFFLINE)); } stateMachine.ReserveState ("FageConnectionStart"); return; } if (_ping != null) { bool last = _online; if (_ping.isDone) { _ping_time = _ping.time; InitPing(); _last_time = Time.realtimeSinceStartup; _online = true; } else if ((Time.realtimeSinceStartup - _start_time) > _TIMEOUT) { _ping_time = (int)_TIMEOUT * 1000; InitPing(); _last_time = Time.realtimeSinceStartup; _online = false; } else { return; } if (last != _online) { if (_online) { stateMachine.DispatchEvent (new FageEvent (FageEvent.SENSOR_ONLINE)); } else { stateMachine.DispatchEvent (new FageEvent (FageEvent.SENSOR_OFFLINE)); } } else { stateMachine.DispatchEvent (new FageEvent (FageEvent.SENSOR_PING, _ping_time)); } } if (_ping == null) { if ((Time.realtimeSinceStartup - _last_time) >= _ITERATE) { _ping = new Ping (_ADDRESS); _start_time = Time.realtimeSinceStartup; } } }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); FageUIManager manager = stateMachine as FageUIManager; if (_async != null) { if (_async.isDone) { manager.ReserveState("FageUIManagerCurtOpen"); } } else { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); } }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); FageBundleLoader loader = stateMachine as FageBundleLoader; if (request != null) { if (request.isDone) { string name = queueAsset.Dequeue() as string; loader.GetLoadedAssets().Add(name, request.asset); request = null; } } else { if ((queueAsset == null) || (queueAsset.Count == 0)) { if (queueBundle.Count > 0) { AssetBundle ab = queueBundle.Dequeue() as AssetBundle; loader.GetLoadedBundles().Add(ab.name); } if ((queueBundle == null) || (queueBundle.Count == 0)) { loader.ReserveState("FageBundleLoaderIdle"); loader.SetUpdateTime(); loader.DispatchEvent(new FageEvent(FageEvent.COMPLETE)); } else { AssetBundle ab = queueBundle.Peek() as AssetBundle; queueAsset = new Queue(ab.GetAllAssetNames()); } } else { AssetBundle ab = queueBundle.Peek() as AssetBundle; string name = queueAsset.Peek() as string; request = ab.LoadAssetAsync(name); } } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); _effector = stateMachine as CameraEffector; _screen = _effector.screen; _blur = _effector.blur; EffectRequest request = _effector.GetRequest(); if (request == null) { _effector.ReserveState("CameraEffectorIdle"); return; } _presetFrom = _effector.DumpEffect(); _presetTo = _effector.GetPreset(request.preset); if (_presetTo == null) { _effector.ReserveState("CameraEffectorIdle"); return; } if (request.second > 0) { if ((_presetFrom.blurSize != _presetTo.blurSize) && (_presetFrom.blurEnable != _presetTo.blurEnable)) { _blur.enabled = true; } if ((_presetFrom.screenSaturation != _presetTo.screenSaturation) || (_presetFrom.chromaticAberrationMagnetude != _presetTo.chromaticAberrationMagnetude) || (_presetFrom.staticMagnetude != _presetTo.staticMagnetude) && (_presetFrom.screenEnable != _presetTo.screenEnable)) { _screen.enabled = true; } LeanTween.value(_effector.gameObject, 0f, 1f, request.second).setOnUpdate(OnTweenUpdate).setOnComplete(OnTweenComplete); } else { OnTweenComplete(); } }
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)); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageBundleLoader.Instance.AddEventListener(FageEvent.COMPLETE, OnLoadBundleComplete); FageUIManager manager = stateMachine as FageUIManager; Queue queue = manager.GetRequests(); if (queue.Count > 0) { FageUIRequest request = queue.Peek() as FageUIRequest; switch (request.command) { case FageUIRequest.CHANGE: ExcuteChange(manager, request); break; case FageUIRequest.PUSH: ExcutePush(manager, request); break; case FageUIRequest.POP: ExcutePop(manager, request); break; case FageUIRequest.POPUP: ExcutePopup(manager, request); break; case FageUIRequest.POPDOWN: ExcutePopdown(manager, request); break; default: throw new UnityException("unkown command"); } } else { throw new UnityException("request lost"); } }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); FageBundleLoader loader = stateMachine as FageBundleLoader; if ((loader.expireTime < (Time.unscaledTime - loader.GetUpdateTime())) || loader.flagUpdate) { loader.flagUpdate = false; loader.ReserveState("FageBundleLoaderCheck"); } else if (loader.flagLoad) { loader.ReserveState("FageBundleLoaderLoad"); } else if (loader.flagDownload) { loader.flagDownload = false; loader.ReserveState("FageBundleLoaderDownload"); } }
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)); }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; if (!fsm.audioSource.isPlaying) { if (fsm.audioSource.timeSamples > 0) { fsm.ReserveState("FageAudioSourcePaused"); } else { fsm.ReserveState("FageAudioSourceReady"); } } else if (_timeSamples > fsm.audioSource.timeSamples) { fsm.NotifyLoop(); } _timeSamples = fsm.audioSource.timeSamples; }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); FageUIManager manager = stateMachine as FageUIManager; Queue queue = manager.GetRequests(); if (queue.Count > 0) { FageUIRequest request = queue.Peek() as FageUIRequest; switch (request.command) { case FageUIRequest.CHANGE: case FageUIRequest.POP: case FageUIRequest.PUSH: ExcutePush(manager, request); break; case FageUIRequest.FLUSH: ExcuteFlush(manager, request); break; case FageUIRequest.POPUP: ExcutePopup(manager, request); break; case FageUIRequest.POPDOWN: ExcutePopdown(manager, request); break; case FageUIRequest.LEVEL: ExcuteLevel(manager, request); break; default: throw new UnityException("unknown commnad"); } } }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); FageUIManager manager = stateMachine as FageUIManager; FageUIRequest request = manager.GetRequests().Peek() as FageUIRequest; if ((request.uiCurtain == null) || (request.levelName == null)) { throw new UnityException("parameter (FageUICurtain, levelName) is required"); } GameObject go = GameObject.Instantiate(FageBundleLoader.Instance.Load(request.uiCurtain) as GameObject); go.transform.SetParent(manager.canvas, false); IFageUICurtainComponent curtain = go.GetComponent <IFageUICurtainComponent> (); if (curtain == null) { throw new UnityException("no interface found : IFageUICurtainComponent"); } curtain.StartClose(OnCloseComplete); }
public override void Excute(FageStateMachine stateMachine) { base.Excute(stateMachine); GalleryScreen gs = stateMachine as GalleryScreen; if (!gs.IsDragging()) { RectTransform rt = gs.GetNearestItem(); /** * something */ switch (Random.Range(1, 3)) { case 1: gs.ReserveState("GalleryUnlocked"); break; case 2: gs.ReserveState("GalleryLocked"); break; } } }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch (stateMachine, afterId); }
public virtual void BeforeSwitch(FageStateMachine stateMachine, string afterId = null) { }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch(stateMachine, afterId); }
public virtual void Excute(FageStateMachine stateMachine) { }
public override void BeforeSwitch(FageStateMachine stateMachine, string afterId) { base.BeforeSwitch (stateMachine, afterId); FageBundleLoader.Instance.RemoveEventListener(FageEvent.COMPLETE, OnLoadBundleComplete); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); List<string> resources = new List<string>(); List<string> loadBundles = new List<string>(); List<string> unloadBundles = new List<string>(); FageBundleLoader loader = stateMachine as FageBundleLoader; Dictionary<string, AssetBundle> downloadedBundles = loader.GetDownloadedBundles(); Dictionary<string, object> loadedAsset = loader.GetLoadedAssets(); List<string> loadedBundles = loader.GetLoadedBundles(); FageUIManager manager = FageUIManager.Instance; Stack stack = manager.GetStack(); Queue queue = manager.GetQueue(); if (stack.Count > 0) { FageUIMem mem = stack.Peek() as FageUIMem; foreach (string s in mem.uiSet.GetBundles()) { if (!resources.Contains(s)) resources.Add(s); } } if (queue.Count > 0) { FageUIPopupMem mem = queue.Peek() as FageUIPopupMem; foreach (string s in mem.uiSet.GetBundles()) { if (!resources.Contains(s)) resources.Add(s); } } foreach (FageBundle bundle in FageBundleRoot.Instance.bundles) { if ((!bundle.isDynamic) && (!loadBundles.Contains(bundle.id))) { loadBundles.Add(bundle.id); } else if ((resources.Contains(bundle.id)) && (!loadBundles.Contains(bundle.id))) { loadBundles.Add(bundle.id); } } foreach (string id in loadedBundles) { if (loadBundles.Contains(id)) { loadBundles.Remove(id); } else if (!unloadBundles.Contains(id)) { unloadBundles.Add(id); } } queueBundle = new Queue(); foreach (string s in loadBundles) { AssetBundle ab = downloadedBundles[s]; ab.name = s; queueBundle.Enqueue(ab); } foreach (string s in unloadBundles) { AssetBundle ab = downloadedBundles[s]; foreach (string abname in ab.GetAllAssetNames()) { loadedAsset.Remove(abname); } loadedBundles.Remove(s); } if (queueBundle.Count > 0) { AssetBundle ab = queueBundle.Peek () as AssetBundle; queueAsset = new Queue (ab.GetAllAssetNames ()); } stateMachine.DispatchEvent (new FageBundleEvent(FageBundleEvent.LOADING)); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); InitPing (); }
public override void Excute(FageStateMachine stateMachine) { base.Excute (stateMachine); }
public virtual void AfterSwitch(FageStateMachine stateMachine, string beforeId = null) { }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch (stateMachine, beforeId); FageAudioSourceControl fsm = stateMachine as FageAudioSourceControl; fsm.SetAudioStatus(FageAudioStatus.READY); }
public override void AfterSwitch(FageStateMachine stateMachine, string beforeId) { base.AfterSwitch(stateMachine, beforeId); Debug.Log("GalleryDragging"); }