|
|
@ -8,6 +8,8 @@ namespace GameServer.Game { |
|
|
|
|
|
|
|
|
|
|
|
private Dictionary<int, Player> Players { get; } = new(); |
|
|
|
private Dictionary<int, Player> Players { get; } = new(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsRunning { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
public GameManager(Room room) { |
|
|
|
public GameManager(Room room) { |
|
|
|
Room = room; |
|
|
|
Room = room; |
|
|
|
foreach (var client in room.Clients) { |
|
|
|
foreach (var client in room.Clients) { |
|
|
@ -17,10 +19,12 @@ namespace GameServer.Game { |
|
|
|
Start(); |
|
|
|
Start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Start() { |
|
|
|
private void Start() { |
|
|
|
foreach (var player in Players.Values) { |
|
|
|
foreach (var player in Players.Values) { |
|
|
|
player.Start(); |
|
|
|
player.Start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IsRunning = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Update() { |
|
|
|
public void Update() { |
|
|
|