コード例 #1
0
ファイル: Application.cs プロジェクト: nigelchanyk/Archetype
        private void ManageScheduledStateEvent(UpdateEvent evt)
        {
            if (PopStateCount > 0)
            {
                while (PopStateCount > 0)
                {
                    StateStack.Pop().Dispose();
                    PopStateCount--;
                }
                if (StateStack.Count > 0)
                    StateStack.Peek().Resume(evt);

            }
            if (NewStateScheduled != null)
            {
                if (StateStack.Count > 0)
                    StateStack.Peek().Pause(evt);
                StateStack.Push(NewStateScheduled);
                NewStateScheduled.ZOrder = (ushort)StateStack.Count;
                NewStateScheduled.Resume(evt);
                NewStateScheduled = null;
            }
        }
コード例 #2
0
ファイル: Application.cs プロジェクト: nigelchanyk/Archetype
 public void SchedulePushState(State newState)
 {
     if (NewStateScheduled != null)
         throw new Exception("New state is already scheduled.");
     NewStateScheduled = newState;
 }