Beispiel #1
0
 public void Execute(Type.Room room)
 {
     roomService.JoinIntoRoom(room).Subscribe(joinedRoom =>
     {
         lobbyModel.JoinedRoom.Value = joinedRoom;
     });
 }
 public void Setup(Type.Room room, Action <Type.Room> onClick)
 {
     roomIdText.text      = room.Id.ToString();
     roomMembersText.text = room.Members.Select(m => m.Name).Aggregate((a, b) => a + ", " + b);
     button.OnSingleClickAsObservable().Subscribe(_ => onClick(room)).AddTo(this);
 }
 public IObservable <Type.JoinedRoom> JoinIntoRoom(Type.Room room)
 {
     return(webApi.JoinIntoRoom(room.Id).Send().Select(r => r.Data.Room));
 }
 void OnRoomClick(Type.Room room)
 {
     joinIntoRoomCommand.Fire(room);
 }
 void OnRoomChange(Type.Room room)
 {
     view.RefreshRoomMembers(room.Members, room.Bots);
 }