示例#1
0
        private void OnPlayerEntityNeeded(NewPlayerEntityNeededEventArgs e)
        {
            var handler = PlayerEntityNeeded;

            if (handler != null)
            {
                handler(this, e);
            }
        }
示例#2
0
        private ServerPlayerCharacterEntity GetNewPlayerEntity(ClientConnection clientConnection, uint entityId)
        {
            var eArgs = new NewPlayerEntityNeededEventArgs {
                Connection = clientConnection, EntityId = entityId
            };

            OnPlayerEntityNeeded(eArgs);

            return(new ServerPlayerCharacterEntity(
                       clientConnection,
                       eArgs.PlayerEntity,
                       _server
                       ));
        }