public virtual void LoadEffects() { foreach (KeyValuePair <string, BaseEffect> ActiveEffect in BaseEffect.LoadFromAssemblyFiles(Directory.GetFiles("Effects", "*.dll"), typeof(SkillEffect), new UnitEffectParams(GlobalBattleContext))) { DicEffect.Add(ActiveEffect.Key, ActiveEffect.Value); } foreach (KeyValuePair <string, BaseEffect> ActiveEffect in BaseEffect.LoadFromAssemblyFiles(Directory.GetFiles("Effects/Battle Map", "*.dll"), typeof(SkillEffect), new UnitEffectParams(GlobalBattleContext))) { DicEffect.Add(ActiveEffect.Key, ActiveEffect.Value); } List <Assembly> ListAssembly = RoslynWrapper.GetCompiledAssembliesFromFolder("Effects", "*.csx", SearchOption.TopDirectoryOnly); foreach (Assembly ActiveAssembly in ListAssembly) { foreach (KeyValuePair <string, BaseEffect> ActiveEffect in BaseEffect.LoadFromAssembly(ActiveAssembly, typeof(SkillEffect), new UnitEffectParams(GlobalBattleContext))) { DicEffect.Add(ActiveEffect.Key, ActiveEffect.Value); } } ListAssembly = RoslynWrapper.GetCompiledAssembliesFromFolder("Effects/Battle Map", "*.csx", SearchOption.TopDirectoryOnly); foreach (Assembly ActiveAssembly in ListAssembly) { foreach (KeyValuePair <string, BaseEffect> ActiveEffect in BaseEffect.LoadFromAssembly(ActiveAssembly, typeof(SkillEffect), new UnitEffectParams(GlobalBattleContext))) { DicEffect.Add(ActiveEffect.Key, ActiveEffect.Value); } } }
public override void LoadEffects() { base.LoadEffects(); foreach (KeyValuePair <string, BaseEffect> ActiveEffect in BaseEffect.LoadFromAssemblyFiles(Directory.GetFiles("Effects/Deathmatch Map", "*.dll"), typeof(DeathmatchEffect), new DeathmatchParams(GlobalDeathmatchContext))) { DicEffect.Add(ActiveEffect.Key, ActiveEffect.Value); } List <Assembly> ListAssembly = RoslynWrapper.GetCompiledAssembliesFromFolder("Effects/Deathmatch Map", "*.csx", SearchOption.TopDirectoryOnly); foreach (Assembly ActiveAssembly in ListAssembly) { foreach (KeyValuePair <string, BaseEffect> ActiveEffect in BaseEffect.LoadFromAssembly(ActiveAssembly, typeof(DeathmatchEffect), new DeathmatchParams(GlobalDeathmatchContext))) { DicEffect.Add(ActiveEffect.Key, ActiveEffect.Value); } } }