コード例 #1
0
 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;
 }
コード例 #2
0
        public static Scene.Type GetCurrentStageType()
        {
            AStage aStage = StageSystem._stack.Peek();

            if (aStage == null)
            {
                return(Scene.Type.EMPTY);
            }
            return(aStage.SceneType());
        }
コード例 #3
0
        public static string GetCurrentStageName()
        {
            AStage aStage = StageSystem._stack.Peek();

            if (aStage == null)
            {
                return(string.Empty);
            }
            return(aStage.GetStageName());
        }
コード例 #4
0
        private static void _ReloadReserved()
        {
            StageSystem._transMode = StageSystem.TransMode.DONE;
            AStage aStage = StageSystem._stack.Peek();

            aStage.OnExit();
            aStage.RegistSeialTaskInternal();
            aStage.OnReloadReserved();
            aStage.OnEnter();
        }
コード例 #5
0
 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
     });
 }
コード例 #6
0
        public static int GetCurrentStageCoTaskCount()
        {
            AStage aStage = StageSystem._stack.Peek();

            if (aStage == null)
            {
                return(0);
            }
            return(aStage.CountCoTask);
        }
コード例 #7
0
 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);
 }
コード例 #8
0
        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);
        }
コード例 #9
0
        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
            });
        }
コード例 #10
0
        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);
        }
コード例 #11
0
        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();
        }
コード例 #12
0
 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
         });
     }
 }
コード例 #13
0
 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();
     }
 }
コード例 #14
0
 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);
 }
コード例 #15
0
        public static bool CurrentStageHandleMessage(string functionName, params object[] Params)
        {
            AStage aStage = StageSystem._stack.Peek();

            return(aStage != null && Dispatcher.DispatchDynamic(aStage, functionName, Params));
        }