private void WaitingTimer_Elapsed(object sender, ElapsedEventArgs e) { WaitingTimer.Enabled = false; if (State != RoomState.Waiting) { return; } bool seekPlayer = false; for (int i = 1; i < Players.Length; i++) { if (Players[i] == null) { seekPlayer = true; break; } } if (seekPlayer) { WaitingRoom?.Invoke(this); } }