-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGate.cs
More file actions
45 lines (39 loc) · 1.45 KB
/
Gate.cs
File metadata and controls
45 lines (39 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using Gate.Networking.Servers;
namespace Gate
{
public sealed class Gate
{
private static volatile Gate _instance;
private static readonly object _lockObject = new Object();
private readonly AuthServer authServer_;
private readonly GameServer gameServer_;
private Gate()
{
authServer_ = new AuthServer();
gameServer_ = new GameServer();
}
public static Gate Instance
{
get
{
if (_instance == null)
{
lock (_lockObject)
{
if (_instance == null)
{
_instance = new Gate();
}
}
}
return _instance;
}
}
public void StartServers()
{
authServer_.Start();
gameServer_.Start();
}
}
}