コード例 #1
0
 /// <summary>
 ///     Adds a network module to the manager.
 /// </summary>
 /// <param name="module"></param>
 public void AddModule(ClientModule module)
 {
     if (modules.ContainsKey(module.GetType()))
     {
         if (NetLogFilter.logWarn)
         {
             Debug.Log(string.Format("{0} Module has already been added. {1} || ({2})", TAG, module, Time.time));
         }
     }
     modules.Add(module.GetType(), module);
 }
コード例 #2
0
 /// <summary>
 ///     Checks if the maanger has the module.
 /// </summary>
 /// <param name="module"></param>
 /// <returns></returns>
 public bool HasModule(ClientModule module)
 {
     return(modules.ContainsKey(module.GetType()));
 }
コード例 #3
0
 /// <summary>
 ///     Adds a network module to the manager and initializes all modules.
 /// </summary>
 /// <param name="module"></param>
 public void AddModuleAndInitialize(ClientModule module)
 {
     AddModule(module);
     InitializeModules();
 }