using System.Collections.Generic;
public interface IAchievementFeature
public class AchievementFeature : FeatureBase, IAchievementFeature
public override void Init(){}
public string GetAchievement()
public class OnlineManager
List<FeatureBase> features;
public void AddFeature(FeatureBase feature)
foreach(var feature in features)
if(feature.GetType() == typeof(T))
public abstract class FeatureBase
public abstract void Init();
public static void Main()
OnlineManager manager = new OnlineManager();
AchievementFeature feature = new AchievementFeature();
manager.AddFeature(feature);
IAchievementFeature ifeature = manager.GetFeature<IAchievementFeature>();