Method parameters were changed in Mirror (#351)

Updated to match current Mirror
This commit is contained in:
uwee 2019-01-27 21:11:11 -05:00 committed by Paul Pacheco
parent 1a5ce38163
commit d168903a3a

View File

@ -26,11 +26,11 @@ using Mirror;
public class MyNetworkManager : NetworkManager
{
public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId)
public override void OnServerAddPlayer(NetworkConnection conn)
{
GameObject player = (GameObject)Instantiate(playerPrefab, Vector3.zero, Quaternion.identity);
player.GetComponent<Player>().color = Color.red;
NetworkServer.AddPlayerForConnection(conn, player, playerControllerId);
NetworkServer.AddPlayerForConnection(conn, player, conn.playerControllerId);
}
}
```