public SetPlayer2 ( string player2 ) : void | ||
player2 | string | |
Résultat | void |
public void OnJoinedRoom(int p0, IRoom p1) { Toast.MakeText(this, "On Joined Room", ToastLength.Short).Show(); switch (p0) { case 0: _roomFragment.SetPlayer1(p1.ParticipantIds[p0]); break; case 1: _roomFragment.SetPlayer2(p1.ParticipantIds[p0]); break; default: Toast.MakeText(this, p0.ToString(), ToastLength.Short).Show(); break; } /* * _gameFragment = new GameFragment(p1); * SupportFragmentManager.BeginTransaction() * .Replace(Resource.Id.FragmentContainer, _gameFragment) * .Commit(); */ }
public void OnRoomCreated(int p0, IRoom room) { Toast.MakeText(this, "On Room Created", ToastLength.Short).Show(); _roomFragment = new RoomFragment(); SupportFragmentManager.BeginTransaction() .Replace(Resource.Id.FragmentContainer, _roomFragment) .Commit(); for (int i = 0; i < room.ParticipantIds.Count; i++) { try { switch (i) { case 0: _roomFragment.SetPlayer1(room.Participants[0].Player.DisplayName); break; case 1: _roomFragment.SetPlayer2(room.Participants[1].Player.DisplayName); break; default: Toast.MakeText(this, p0, ToastLength.Short).Show(); break; } } catch (Exception e) { } } /* * _gameFragment = new GameFragment(room); * SupportFragmentManager.BeginTransaction() * .Replace(Resource.Id.FragmentContainer, _gameFragment) * .Commit(); */ }
public void OnRoomCreated(int p0, IRoom room) { Toast.MakeText(this, "On Room Created", ToastLength.Short).Show(); _roomFragment = new RoomFragment(); SupportFragmentManager.BeginTransaction() .Replace(Resource.Id.FragmentContainer, _roomFragment) .Commit(); for (int i = 0; i < room.ParticipantIds.Count; i++) { try { switch (i) { case 0: _roomFragment.SetPlayer1(room.Participants[0].Player.DisplayName); break; case 1: _roomFragment.SetPlayer2(room.Participants[1].Player.DisplayName); break; default: Toast.MakeText(this, p0, ToastLength.Short).Show(); break; } } catch (Exception e) { } } /* _gameFragment = new GameFragment(room); SupportFragmentManager.BeginTransaction() .Replace(Resource.Id.FragmentContainer, _gameFragment) .Commit(); */ }