Esempio n. 1
0
File: World.cs Progetto: ndech/Alpha
        public IEnumerable <Notification> GetLiveNotifications(RealmToken realm)
        {
            List <Notification> notification = _liveNotifications.Where(n => n.ValidForRealm(realm)).ToList();

            _liveNotifications.Clear();
            return(notification);
        }
Esempio n. 2
0
File: World.cs Progetto: ndech/Alpha
 public void RegisterCommands(RealmToken source, IEnumerable <Command> commands)
 {
     foreach (Command command in commands)
     {
         RegisterCommand(source, 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);
 }
Esempio n. 4
0
File: Game.cs Progetto: ndech/Alpha
 private void NewRealm(RealmToken token)
 {
     _tokens.Add(token);
     _ais.Add(new Ai(token, _world));
 }
Esempio n. 5
0
File: World.cs Progetto: ndech/Alpha
 public void RegisterInteractiveRealm(RealmToken token)
 {
     _interactiveModeRealms.Add(token);
 }
Esempio n. 6
0
File: World.cs Progetto: ndech/Alpha
 public void RegisterInteractiveRealm(RealmToken token)
 {
     _interactiveModeRealms.Add(token);
 }
Esempio n. 7
0
File: World.cs Progetto: ndech/Alpha
 public void RegisterCommands(RealmToken source, IEnumerable<Command> commands)
 {
     foreach (Command command in commands)
         RegisterCommand(source, command);
 }
Esempio n. 8
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);
 }
Esempio n. 9
0
File: World.cs Progetto: ndech/Alpha
 public IEnumerable<Notification> GetLiveNotifications(RealmToken realm)
 {
     List<Notification> notification = _liveNotifications.Where(n=>n.ValidForRealm(realm)).ToList();
     _liveNotifications.Clear();
     return notification;
 }
Esempio n. 10
0
File: Ai.cs Progetto: ndech/Alpha
 public Ai(RealmToken realm, IWorld world)
 {
     _realm = realm;
     _world = world;
 }