private static void _PushReserved() { StageSystem._transMode = StageSystem.TransMode.DONE; StageSystem._stack.Peek().OnExit(); StageSystem._nxtStg.RegistSeialTaskInternal(); StageSystem._nxtStg.OnEnter(); StageSystem._stack.Push(StageSystem._nxtStg); StageSystem._nxtStg = null; }
public static Scene.Type GetCurrentStageType() { AStage aStage = StageSystem._stack.Peek(); if (aStage == null) { return(Scene.Type.EMPTY); } return(aStage.SceneType()); }
public static string GetCurrentStageName() { AStage aStage = StageSystem._stack.Peek(); if (aStage == null) { return(string.Empty); } return(aStage.GetStageName()); }
private static void _ReloadReserved() { StageSystem._transMode = StageSystem.TransMode.DONE; AStage aStage = StageSystem._stack.Peek(); aStage.OnExit(); aStage.RegistSeialTaskInternal(); aStage.OnReloadReserved(); aStage.OnEnter(); }
public static void ReserveMoveStage(AStage iStg) { StageSystem._transMode = StageSystem.TransMode.MOVE; StageSystem._nxtStg = iStg; iStg.OnPrepareSceneChange(); TsLog.Log("=== StageSystem.ReserveMoveStage : {0}", new object[] { StageSystem._nxtStg.GetType().Name }); }
public static int GetCurrentStageCoTaskCount() { AStage aStage = StageSystem._stack.Peek(); if (aStage == null) { return(0); } return(aStage.CountCoTask); }
static StageSystem() { StageSystem._transMode = StageSystem.TransMode.NONE; StageSystem._nxtStg = null; StageSystem._1stRunPassed = false; StageSystem._stack = new Stack <AStage>(4); StageSystem.bStabled = false; StageSystem._stgCommon = null; StageSystem._stgCommon = new StageSystem.StgCommon(); StageSystem._stack.Push(StageSystem._stgCommon); }
public static void ResetStack() { TsLog.Log("=== StageSystem.ResetStack", new object[0]); AStage t = StageSystem._stack.Pop(); while (StageSystem._stack.Count > 1) { StageSystem._stack.Pop(); } StageSystem._stack.Push(t); }
public static void ReloadStage() { StageSystem._transMode = StageSystem.TransMode.RELOAD; AStage aStage = StageSystem._stack.Peek(); aStage.OnPrepareSceneChange(); TsLog.Log("=== StageSystem.ReloadStage POP: {0}", new object[] { aStage.GetType().Name }); }
public static void InsertPush(AStage astg) { TsLog.Log("=== StageSystem.PushStageSwap TOPSWAP: {0} / {1}", new object[] { StageSystem._stack.Peek().GetType().Name, astg.GetType().Name }); AStage t = StageSystem._stack.Pop(); StageSystem._stack.Push(astg); StageSystem._stack.Push(t); }
private static void _MoveReserved() { AStage aStage = StageSystem._stack.Pop(); aStage.OnExit(); aStage = StageSystem._nxtStg; StageSystem._nxtStg = null; StageSystem._transMode = StageSystem.TransMode.DONE; StageSystem._stack.Push(aStage); aStage.RegistSeialTaskInternal(); aStage.OnEnter(); }
public static void ReservePushStage(AStage iStg) { if (iStg == null) { TsLog.LogError("=== StageSystem.ReservePushStage(null) null parameter!", new object[0]); } else { StageSystem._nxtStg = iStg; StageSystem._transMode = StageSystem.TransMode.PUSH; iStg.OnPrepareSceneChange(); TsLog.Log("=== StageSystem.ReservePushStage PUSH: {0}", new object[] { StageSystem._nxtStg.GetType().Name }); } }
public static void SetStartStage(AStage iStg) { if (StageSystem._1stRunPassed) { TsLog.LogWarning("!!!!!! StageSystem.SetStartStage() called multiple! Watch your code carefully!", new object[0]); } else if (iStg == null) { TsLog.LogError("!!!!!! StageSystem.SetStartStage(null) null parameter!", new object[0]); } else { StageSystem._1stRunPassed = true; StageSystem._stack.Push(iStg); iStg.RegistSeialTaskInternal(); iStg.OnEnter(); } }
public static Scene.Type ReservePopStage() { Scene.Type result = Scene.Type.EMPTY; if (StageSystem._stack.Count <= 1) { TsLog.LogError("=== StageSystem.ReservePopStage stack empty", new object[0]); } else { AStage aStage = StageSystem._stack.Pop(); AStage aStage2 = StageSystem._stack.Peek(); aStage2.OnPrepareSceneChange(); result = aStage2.SceneType(); StageSystem._stack.Push(aStage); StageSystem._transMode = StageSystem.TransMode.POP; TsLog.Log("=== StageSystem.ReservePopStage POP: {0}", new object[] { aStage.GetType().Name }); } return(result); }
public static bool CurrentStageHandleMessage(string functionName, params object[] Params) { AStage aStage = StageSystem._stack.Peek(); return(aStage != null && Dispatcher.DispatchDynamic(aStage, functionName, Params)); }