public override void Initialize(InsightClient insight, ModuleManager manager) { if (MaxMinutesOfIdle > 0) { InvokeRepeating("UpdateIdleState", MaxMinutesOfIdle * 60f, MaxMinutesOfIdle * 60f); } }
public override void Initialize(InsightClient _client, ModuleManager _manager) { Debug.Log("[ClientMatchMaker] - Initialization"); client = _client; gameModule = _manager.GetModule <GameClientManager>(); }
public virtual void Initialize(InsightClient clientTransport, string networkAddress, int networkHostId, int networkConnectionId) { address = networkAddress; hostId = networkHostId; connectionId = networkConnectionId; client = clientTransport; }
public override void Initialize(InsightClient _client, ModuleManager _manager) { Debug.Log("[ChatClient] - Initialization"); client = _client; RegisterHandlers(); }
public virtual void Initialize(InsightClient client, ModuleManager manager) { if (client.logNetworkMessages) { Debug.LogWarning("[Module Manager] Initialize InsightClient not found for module"); } }
public override void Initialize(InsightClient client, ModuleManager manager) { this.client = client; networkManagerTransport = Transport.activeTransport; RegisterHandlers(); }
public override void Initialize(InsightClient _client, ModuleManager _manager) { Debug.Log("[ServerIdler] - Initialization"); transport = Transport.activeTransport; netManager = NetworkManager.singleton; RegisterHandlers(); CheckIdle(); }
public override void Initialize(InsightClient insight, ModuleManager manager) { client = insight; client.transport.OnClientConnected = SendGameRegistrationToGameManager; networkManagerTransport = Transport.activeTransport; RegisterHandlers(); GatherCmdArgs(); InvokeRepeating("SendGameStatusToGameManager", 30f, 30f); }
public override void Initialize(InsightClient insight, ModuleManager manager) { client = insight; insightTransport.OnClientConnected.AddListener(SendGameRegistrationToGameManager); RegisterHandlers(); GatherCmdArgs(); InvokeRepeating("SendGameStatusToGameManager", 30f, 30f); }
private void Awake() { server = GetComponent <InsightServer>(); client = GetComponent <InsightClient>(); if (server) { server.enabled = false; } if (client) { client.enabled = false; } }
public override void Initialize(InsightClient _client, ModuleManager _manager) { Debug.Log("[GameServerManager] - Initialization"); client = _client; transport = Transport.activeTransport; netManager = NetworkManager.singleton; GatherCmdArgs(); RegisterHandlers(); netManager.maxConnections = maxPlayers; netManager.StartServer(); }
void Awake() { client = GetComponent <InsightClient>(); server = GetComponent <InsightServer>(); if (client) { _cachedClientAutoStartValue = client.AutoStart; client.AutoStart = false; //Wait until modules are loaded to AutoStart } if (server) { _cachedServerAutoStartValue = server.AutoStart; server.AutoStart = false; //Wait until modules are loaded to AutoStart } }
void Awake() { if (DontDestroy) { if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(this); } else { instance = this; } }
public virtual void Initialize(InsightClient _client, ModuleManager _manager) { Debug.LogWarning("[Module Manager] Initialize InsightClient not found for module"); }
public bool InitializeModules(InsightClient client, InsightServer server) { var checkOptional = true; // Initialize modules while (true) { var changed = false; foreach (var entry in _modules) { // Module is already initialized if (_initializedModules.Contains(entry.Key)) { continue; } // Not all dependencies have been initialized if (!entry.Value.Dependencies.All(d => _initializedModules.Any(d.IsAssignableFrom))) { continue; } // Not all OPTIONAL dependencies have been initialized if (checkOptional && !entry.Value.OptionalDependencies.All(d => _initializedModules.Any(d.IsAssignableFrom))) { continue; } // If we got here, we can initialize our module if (server) { entry.Value.Initialize(server, this); Debug.LogWarning("[" + gameObject.name + "] Loaded InsightServer Module: " + entry.Key.ToString()); } if (client) { entry.Value.Initialize(client, this); Debug.LogWarning("[" + gameObject.name + "] Loaded InsightClient Module: " + entry.Key.ToString()); } //Add the new module to the HashSet _initializedModules.Add(entry.Key); // Keep checking optional if something new was initialized checkOptional = true; changed = true; } // If we didn't change anything, and initialized all that we could // with optional dependencies in mind if (!changed && checkOptional) { // Initialize everything without checking optional dependencies checkOptional = false; continue; } // If we can no longer initialize anything if (!changed) { return(!GetUninitializedModules().Any()); } } }
public virtual void Initialize(InsightClient client, ModuleManager manager) { logger.LogWarning("[Module Manager] Initialize InsightClient not found for module"); }
public override void Initialize(InsightClient client, ModuleManager manager) { this.client = client; RegisterHandlers(); }