mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 12:09:34 +08:00
RoomList : IEnumerable<Room>
This commit is contained in:
parent
84a0b231c4
commit
08670173eb
@ -4,7 +4,7 @@ using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.Core.Model
|
||||
{
|
||||
public class RoomList : IEnumerable
|
||||
public class RoomList : IEnumerable<Room>
|
||||
{
|
||||
private readonly Dictionary<string, Room> _List = new();
|
||||
private readonly Dictionary<string, List<User>> _PlayerList = new();
|
||||
@ -93,5 +93,13 @@ namespace Milimoe.FunGame.Core.Model
|
||||
yield return room;
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator<Room> IEnumerable<Room>.GetEnumerator()
|
||||
{
|
||||
foreach (Room room in ListRoom)
|
||||
{
|
||||
yield return room;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user