public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) { int playerIndex = GameManger.GetInstance().GetPlayerFill(); GameObject player = Instantiate(playerPrefab); GameManger.GetInstance().size[playerIndex]++; GameManger.GetInstance().UI.OnPlayerSizeChanged(SyncListInt.Operation.OP_DIRTY, playerIndex); NetworkServer.AddPlayerForConnection(conn, player, playerControllerId); }
public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) { GameObject player = Instantiate(playerPrefab); player.gameObject.GetComponent <Ctrl.LocalPlayerManeger>().playerNum = GameManger.GetInstance().GetPlayerFill(); GameManger.GetInstance().size[player.gameObject.GetComponent <Ctrl.LocalPlayerManeger>().playerNum]++; GameManger.GetInstance().UI.OnPlayerSizeChanged(SyncListInt.Operation.OP_DIRTY, player.gameObject.GetComponent <Ctrl.LocalPlayerManeger>().playerNum); NetworkServer.AddPlayerForConnection(conn, player, playerControllerId); }
public override void OnServerAddPlayer(NetworkConnection conn, short playerControllerId) { int playerIndex = GameManger.GetInstance().GetPlayerFill(); GameObject player = Instantiate(playerPrefab); GameManger.GetInstance().size[playerIndex]++; GameManger.GetInstance().UI.OnPlayerSizeChanged(SyncListInt.Operation.OP_DIRTY, playerIndex); NetworkServer.AddPlayerForConnection(conn, player, playerControllerId); //クライアントのプレイヤーナンバーをカードデータに代入 player.gameObject.GetComponent <Ctrl.BldgData_Maneger>().useCardData.PlayerNum = playerIndex; }
public void OnPlayerSizeChanged(SyncListInt.Operation op, int index) { PlayerSize[index].value = GameManger.GetInstance().size[index]; }
public void OnPlayerSizeChanged(SyncListInt.Operation op, int index) { Log.Write("dasdas dsaasdasd"); PlayerSize[index].value = GameManger.GetInstance().size[index]; }