예제 #1
0
 private void BuildBlock(BuildBlockCommand command)
 {
     if (_regions.ContainsKey(command.RegionName) && !_expired)
     {
         var region = _regions[command.RegionName];
         _regions[command.RegionName] = region.AddBlocks(1);
         if (!_playerClicks.ContainsKey(command.ConnectionId))
         {
             _playerClicks[command.ConnectionId] = new PlayerBlockCount(command.ConnectionId, 1);
         }
         else
         {
             var clicks = _playerClicks[command.ConnectionId];
             _playerClicks[command.ConnectionId] = clicks.AddClicks(1);
         }
         Sender.Tell(new BlockBuiltMessage(command.ConnectionId, _gameState.GameId));
     }
 }
예제 #2
0
 private void BuildBlock(BuildBlockCommand command)
 {
     Context.System.ActorSelection("/user/supervisor/" + command.GameId.ToString()).Tell(command);
 }