diff --git a/NetworkManager.cs b/NetworkManager.cs index e3683fe..c03726c 100644 --- a/NetworkManager.cs +++ b/NetworkManager.cs @@ -24,7 +24,7 @@ public static NetworkManager Self { if(self == null) { - throw new InvalidOperationException("NetworkManager must first be constructed in a class such as Game1"); + self = new NetworkManager(); } return self; } @@ -159,6 +159,11 @@ public INetworkArena GameArena private INetworkArena mGameArena; + NetworkManager() + { + + } + /// /// Instantiate the Network. /// WARNING: If no logger is provided, all messages will be swallowed. @@ -166,7 +171,7 @@ public INetworkArena GameArena /// Configuration for networking /// The game arena /// An ILogger to write messages to - public NetworkManager(NetworkConfiguration config, ILogger log = null) + public void Initialize(NetworkConfiguration config, ILogger log = null) { self = this; Configuration = config;