예제 #1
0
파일: World.cs 프로젝트: ndech/Alpha
 private void ExecuteCommand(Command command)
 {
     if (command.IsValid())
         command.Execute();
 }
예제 #2
0
파일: Context.cs 프로젝트: ndech/Alpha
 public void RegisterCommand(Command command)
 {
     World.RegisterCommand(RealmToken, command);
 }
예제 #3
0
파일: World.cs 프로젝트: ndech/Alpha
 public void RegisterCommand(RealmToken source, Command command)
 {
     command.Source = source;
     if (_interactiveModeRealms.Contains(source))
     {
         DebugConsole.WriteLine("Interactive command : " + command);
         new Thread(()=>_datalock.ImmediateWrite(() => ExecuteCommand(command))).Start();
         DebugConsole.WriteLine("Interactive command done : " + command);
         return;
     }
     DebugConsole.WriteLine("Defered command : "+command);
     _commands.Enqueue(command);
 }