Esempio n. 1
0
 public void Refresh(List <MyPhoton.MyPlayer> _new_players)
 {
     for (int i = 0; i < _new_players.Count; ++i)
     {
         if (_new_players[i].photonPlayerID > -1)
         {
             this.tmp_entry_member = this.room_members.Find((Predicate <ChatUtility.RoomMember>)(a => a.PlayerId == _new_players[i].playerID));
             if (this.tmp_entry_member == null)
             {
                 JSON_MyPhotonPlayerParam photonPlayerParam = JSON_MyPhotonPlayerParam.Parse(_new_players[i].json);
                 ChatUtility.RoomMember   roomMember        = new ChatUtility.RoomMember();
                 roomMember.SetParam(_new_players[i].photonPlayerID, _new_players[i].playerID, photonPlayerParam.UID, photonPlayerParam.playerName);
                 if (!this.entry_members.Contains(roomMember))
                 {
                     this.entry_members.Add(roomMember);
                 }
             }
         }
     }
     for (int i = 0; i < this.room_members.Count; ++i)
     {
         if (this.room_members[i].PhotonPlayerId > -1)
         {
             this.tmp_leave_member = _new_players.Find((Predicate <MyPhoton.MyPlayer>)(a => a.playerID == this.room_members[i].PlayerId));
             if (this.tmp_leave_member == null && !this.leave_members.Contains(this.room_members[i]))
             {
                 this.leave_members.Add(this.room_members[i]);
             }
         }
     }
     for (int index = 0; index < this.entry_members.Count; ++index)
     {
         if (!this.room_members.Contains(this.entry_members[index]))
         {
             this.room_members.Add(this.entry_members[index]);
         }
     }
     for (int index = 0; index < this.leave_members.Count; ++index)
     {
         if (this.room_members.Contains(this.leave_members[index]))
         {
             this.room_members.Remove(this.leave_members[index]);
         }
     }
 }
Esempio n. 2
0
 public void Refresh(List <MyPhoton.MyPlayer> _new_players)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     ChatUtility.RoomMemberManager.\u003CRefresh\u003Ec__AnonStorey317 refreshCAnonStorey317 = new ChatUtility.RoomMemberManager.\u003CRefresh\u003Ec__AnonStorey317();
     // ISSUE: reference to a compiler-generated field
     refreshCAnonStorey317._new_players = _new_players;
     // ISSUE: reference to a compiler-generated field
     refreshCAnonStorey317.\u003C\u003Ef__this = this;
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     ChatUtility.RoomMemberManager.\u003CRefresh\u003Ec__AnonStorey318 refreshCAnonStorey318 = new ChatUtility.RoomMemberManager.\u003CRefresh\u003Ec__AnonStorey318();
     // ISSUE: reference to a compiler-generated field
     refreshCAnonStorey318.\u003C\u003Ef__ref\u0024791 = refreshCAnonStorey317;
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     for (refreshCAnonStorey318.i = 0; refreshCAnonStorey318.i < refreshCAnonStorey317._new_players.Count; ++refreshCAnonStorey318.i)
     {
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         if (refreshCAnonStorey317._new_players[refreshCAnonStorey318.i].photonPlayerID > -1)
         {
             // ISSUE: reference to a compiler-generated method
             this.tmp_entry_member = this.room_members.Find(new Predicate <ChatUtility.RoomMember>(refreshCAnonStorey318.\u003C\u003Em__332));
             if (this.tmp_entry_member == null)
             {
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 JSON_MyPhotonPlayerParam photonPlayerParam = JSON_MyPhotonPlayerParam.Parse(refreshCAnonStorey317._new_players[refreshCAnonStorey318.i].json);
                 ChatUtility.RoomMember   roomMember        = new ChatUtility.RoomMember();
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 roomMember.SetParam(refreshCAnonStorey317._new_players[refreshCAnonStorey318.i].photonPlayerID, refreshCAnonStorey317._new_players[refreshCAnonStorey318.i].playerID, photonPlayerParam.UID, photonPlayerParam.playerName);
                 if (!this.entry_members.Contains(roomMember))
                 {
                     this.entry_members.Add(roomMember);
                 }
             }
         }
     }
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     ChatUtility.RoomMemberManager.\u003CRefresh\u003Ec__AnonStorey319 refreshCAnonStorey319 = new ChatUtility.RoomMemberManager.\u003CRefresh\u003Ec__AnonStorey319();
     // ISSUE: reference to a compiler-generated field
     refreshCAnonStorey319.\u003C\u003Ef__this = this;
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     for (refreshCAnonStorey319.i = 0; refreshCAnonStorey319.i < this.room_members.Count; ++refreshCAnonStorey319.i)
     {
         // ISSUE: reference to a compiler-generated field
         if (this.room_members[refreshCAnonStorey319.i].PhotonPlayerId > -1)
         {
             // ISSUE: reference to a compiler-generated field
             // ISSUE: reference to a compiler-generated method
             this.tmp_leave_member = refreshCAnonStorey317._new_players.Find(new Predicate <MyPhoton.MyPlayer>(refreshCAnonStorey319.\u003C\u003Em__333));
             // ISSUE: reference to a compiler-generated field
             if (this.tmp_leave_member == null && !this.leave_members.Contains(this.room_members[refreshCAnonStorey319.i]))
             {
                 // ISSUE: reference to a compiler-generated field
                 this.leave_members.Add(this.room_members[refreshCAnonStorey319.i]);
             }
         }
     }
     for (int index = 0; index < this.entry_members.Count; ++index)
     {
         if (!this.room_members.Contains(this.entry_members[index]))
         {
             this.room_members.Add(this.entry_members[index]);
         }
     }
     for (int index = 0; index < this.leave_members.Count; ++index)
     {
         if (this.room_members.Contains(this.leave_members[index]))
         {
             this.room_members.Remove(this.leave_members[index]);
         }
     }
 }