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"); } }
private void OnOpenComplete() { GameObject.Destroy(_curtain.GetGameObject()); FageUIManager manager = FageUIManager.Instance; manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); if (queue.Count > 0) { manager.ReserveState ("FageUIManagerTransOut"); } else { manager.GetRequests ().Dequeue (); } }
private void ExcuteFlush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); FageUIMem current = stack.Peek () as FageUIMem; stack.Clear (); stack.Push (current); manager.GetRequests ().Dequeue (); }
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); }
private void ExcuteFlush(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); FageUIMem current = stack.Peek() as FageUIMem; stack.Clear(); stack.Push(current); manager.GetRequests().Dequeue(); }
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"); } }
private void ExcutePopup(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); FageUIPopupMem mem = new FageUIPopupMem (request.uiSet); queue.Enqueue(mem); if (queue.Count == 1) { manager.ReserveState("FageUIManagerSwitch"); } else { manager.GetRequests().Dequeue(); } }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); if (stack.Count > 0) { FageUIMem current = stack.Peek () as FageUIMem; this.current = current; current.Resume(manager.canvas, request.param); } else { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } }
private void ExcutePopup(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); if (queue.Count == 0) { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); if (queue.Count > 0) { manager.ReserveState("FageUIManagerTransOut"); } else { manager.GetRequests().Dequeue(); } }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); if (queue.Count > 0) { FageUIPopupMem current = queue.Peek () as FageUIPopupMem; this.current = current; current.Instantiate (manager.canvas, request.param); } else { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } }
private void ExcutePopup(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); FageUIPopupMem mem = new FageUIPopupMem(request.uiSet); queue.Enqueue(mem); if (queue.Count == 1) { manager.ReserveState("FageUIManagerSwitch"); } else { manager.GetRequests().Dequeue(); } }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack (); if (stack.Count > 0) { stack.Pop (); } if (stack.Count == 0) { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); if (stack.Count > 0) { FageUIMem current = stack.Peek() as FageUIMem; this.current = current; current.Resume(manager.canvas, request.param); } else { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } }
private void ExcutePopdown(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue(); if (queue.Count > 0) { FageUIPopupMem current = queue.Peek() as FageUIPopupMem; this.current = current; current.Instantiate(manager.canvas, request.param); } else { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } }
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"); } }
private void ExcutePop(FageUIManager manager, FageUIRequest request) { Stack stack = manager.GetStack(); if (stack.Count > 0) { stack.Pop(); } if (stack.Count == 0) { manager.GetRequests().Dequeue(); manager.ReserveState("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }
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); 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); }
private void ExcutePopup(FageUIManager manager, FageUIRequest request) { Queue queue = manager.GetQueue (); if (queue.Count == 0) { manager.GetRequests ().Dequeue (); manager.ReserveState ("FageUIManagerIdle"); return; } // load bundle FageBundleLoader.Instance.ReserveLoad(); }