示例#1
0
文件: Player.php 项目: h11Nox/slug
 /**
  * Send
  * @param $response
  */
 public function send(Response $response)
 {
     if ($this->isConnected()) {
         $event = new UserSendEvent();
         $event->player = $this;
         $this->game->trigger('user-message', $event);
         $this->connection->send(json_encode($response->getResponseData()));
     }
 }