Esempio n. 1
0
File: World.cs Progetto: ndech/Alpha
 private void ExecuteCommand(Command command)
 {
     if (command.IsValid())
         command.Execute();
 }
Esempio n. 2
0
 public void RegisterCommand(Command command)
 {
     World.RegisterCommand(RealmToken, command);
 }
Esempio n. 3
0
File: World.cs Progetto: 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);
 }