示例#1
0
        private void OnBlockBuilt(BlockBuiltMessage x)
        {
            _connectionId = x.ConnectionId;
            _dirty        = true;

            if (!_gameToCountMap.ContainsKey(x.GameId))
            {
                _gameToCountMap[x.GameId] = 0;
            }

            var blockCount = ++_gameToCountMap[x.GameId];

            var accomplishment = _accomplishmentManager.GetAccomplishment(blockCount);

            if (accomplishment != null)
            {
                var hub = _connectionManager.GetHubContext <GameHub>();
                hub.Clients.Client(x.ConnectionId).onAchieve(accomplishment);
            }
        }
示例#2
0
 private void OnBlockBuilt(BlockBuiltMessage x)
 {
     Context.Child("stats").Tell(x);
 }