【问题标题】:Photon kick manually added player from the gamePhoton kick 从游戏中手动添加玩家
【发布时间】:2020-10-08 04:51:03
【问题描述】:

我在游戏中添加了一些机器人作为玩家

PhotonNetwork.CurrentRoom.AddPlayer(bot); //bot is derived from Photon.Realtime.Player

现在当机器人输掉比赛时,我想踢他,所以我打电话

PhotonNetwork.CloseConnection(bot);

但是 PhotonNetwork.CurrentRoom.Players、PhotonNetwork.PlayerList、PhotonNetwork.CurrentRoom.PlayerCount 没有受到影响我无法从主客户端从游戏中删除机器人

【问题讨论】:

    标签: unity3d networking photon


    【解决方案1】:

    因此,您不能将机器人添加为双关语中的玩家,玩家指的是特定的连接玩家。您可以向其发送事件等 所以我将不得不制作我自己的自定义列表,其中包含机器人和玩家。我将无法使用 Photon 提供的任何播放器列表或字典。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 2022-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-20
      相关资源
      最近更新 更多