private void AddPlugin(BaseActorPlugin plugin, System.Type type) { if (!this._pluginMap.ContainsKey(type)) { this._pluginMap.Add(type, plugin); this._pluginList.Add(plugin); plugin.OnAdded(); } }
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(); } }
public void AddPluginAs <T>(BaseActorPlugin plugin) where T : BaseActorPlugin { this.AddPlugin(plugin, typeof(T)); }
public void AddPlugin(BaseActorPlugin plugin) { System.Type type = plugin.GetType(); this.AddPlugin(plugin, type); }
public void RemovePlugin(BaseActorPlugin plugin) { this.RemovePlugin(plugin.GetType()); }