Пример #1
0
 internal void StackAndFlush(ResolveContext ctx)
 {
     Debug.Assert(ctx.Game == this);
     Debug.Assert(!m_resolveContextStack.Contains(ctx));
     Debug.Assert(m_resolveContextStack.Count == 0
                  || (m_resolveContextStack.Peek().RunningCommand != null
                      && m_resolveContextStack.Peek().RunningCommand.ExecutionPhase == Commands.CommandPhase.Preemptive));
     m_resolveContextStack.Push(ctx);
     ctx.FlushCommandQueue();
     m_resolveContextStack.Pop();
 }
Пример #2
0
 bool IsCommandRunnable(Commands.BaseCommand command)
 {
     var ctx = new ResolveContext(this);
     m_resolveContextStack.Push(ctx);
     bool ret = ctx.IsCommandRunnable(command);
     m_resolveContextStack.Pop();
     return ret;
 }
Пример #3
0
 internal void StackAndFlush(params Commands.BaseCommand[] commands)
 {
     var ctx = new ResolveContext(this);
     ctx.QueueCommands(commands);
     StackAndFlush(ctx);
 }