|
|
@ -7,6 +7,8 @@ namespace GameServer.Game { |
|
|
|
private Room Room { get; } |
|
|
|
private Room Room { get; } |
|
|
|
|
|
|
|
|
|
|
|
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; |
|
|
@ -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() { |
|
|
|