コード例 #1
0
ファイル: FriendsAppUser.cs プロジェクト: lukyhruska96/VRLife
 public FriendsAppUser(FriendsAppUserMsg msg)
 {
     UserId        = msg.UserId;
     Username      = msg.Username;
     CurrentRoomId = msg.InRoomCase == FriendsAppUserMsg.InRoomOneofCase.RoomId ? (uint?)msg.RoomId : null;
     FriendsList   = msg.FriendList.ToArray();
 }
コード例 #2
0
ファイル: FriendsAppUser.cs プロジェクト: lukyhruska96/VRLife
        public FriendsAppUserMsg ToNetworkModel()
        {
            FriendsAppUserMsg friendMsg = new FriendsAppUserMsg();

            friendMsg.UserId   = UserId;
            friendMsg.Username = Username;
            if (CurrentRoomId.HasValue)
            {
                friendMsg.RoomId = CurrentRoomId.Value;
            }
            if (FriendsList != null)
            {
                friendMsg.FriendList.AddRange(FriendsList);
            }
            return(friendMsg);
        }