Example #1
0
 private void AddPlugin(BaseActorPlugin plugin, System.Type type)
 {
     if (!this._pluginMap.ContainsKey(type))
     {
         this._pluginMap.Add(type, plugin);
         this._pluginList.Add(plugin);
         plugin.OnAdded();
     }
 }
Example #2
0
 public void RemovePlugin(System.Type type)
 {
     if (this._pluginMap.ContainsKey(type))
     {
         BaseActorPlugin item = this._pluginMap[type];
         this._pluginMap.Remove(type);
         this._pluginList.Remove(item);
         item.OnRemoved();
     }
 }
Example #3
0
 public void AddPluginAs <T>(BaseActorPlugin plugin) where T : BaseActorPlugin
 {
     this.AddPlugin(plugin, typeof(T));
 }
Example #4
0
 public void AddPlugin(BaseActorPlugin plugin)
 {
     System.Type type = plugin.GetType();
     this.AddPlugin(plugin, type);
 }
Example #5
0
 public void RemovePlugin(BaseActorPlugin plugin)
 {
     this.RemovePlugin(plugin.GetType());
 }